【发布时间】:2023-05-24 16:41:02
【问题描述】:
我有这段代码:
let arcPath = UIBezierPath(ovalInRect: CGRectMake(0, 0, frame.width, frame.height))
circleLayer = CAShapeLayer()
circleLayer.path = arcPath.CGPath
circleLayer.fillColor = UIColor.clearColor().CGColor
circleLayer.strokeColor = UIColor.blueColor().CGColor
circleLayer.lineWidth = 5.0;
circleLayer.strokeStart = 0
circleLayer.strokeEnd = 0.7
结果如下:
如您所见,圆弧从圆的右侧开始。我想从顶部开始绘制弧线。我该怎么做?我是否必须将整个物体旋转 -90 度才能完成我想要做的事情?
谢谢。
【问题讨论】:
标签: ios swift cashapelayer