Animate a CAShapeLayer to draw a progress circle Animate a CAShapeLayer to draw a progress circle objective-c objective-c

Animate a CAShapeLayer to draw a progress circle


I figured it out. The strokeStart and strokeEnd values are from 0.0 to 1.0, so the values I was giving it were way too high.

So, I just updated my setting to:

- (void)setProgress:(double)progress {    _progress = progress * 0.00460;    [self updateAnimations];}


My answer with example here. In general you should add the animation to CAShapeLayer.