上CAShapeLayer

问题描述:

逆时针行程如何设置一个CAShapeLayer上CAShapeLayer

的strokeStart和strokeEnd方向这是你得到的开箱即用。 (strokeEnd为0.75)

你怎么可以把它移动相反的方向(strokeEnd为0.75)

的问题是不是strokeEnd,但CGPath你”重新使用,顺时针方向。

我想你想的:[[UIBezierPath bezierPathWithOvalInRect:yourRect] bezierPathByReversingPath].CGPath

编辑:

另一种方式会一直使用

strokeStart = 1 - strokeEnd; // not sure about the name "strokeStart" 
strokeEnd = 1; 

,但反转的路径表示你的意图,更好的