CAShapeLayer’s strokeEnd doesn’t animate
问题 This is the code I’m using to animate my CAShapeLayer : _progressBarLayer.strokeEnd = CGFloat(_progressToDrawForProgress(progress)) let progressAnimation = CABasicAnimation(keyPath: "strokeEnd") progressAnimation.duration = CFTimeInterval(1.0) progressAnimation.fromValue = CGFloat(self.progress) progressAnimation.toValue = _progressBarLayer.strokeEnd progressAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn) _progressBarLayer.addAnimation(progressAnimation,