Try to search your question here, if you can't find : Ask Any Question Now ?

CAShapeLayer animate lineCap property

HomeCategory: stackoverflowCAShapeLayer animate lineCap property
Avatarbhawya asked 5 months ago

I would like to animate lineCap property of a CAShapeLayer.
Here is my code:

  func animate() {
    let animation = CABasicAnimation(keyPath: "lineCap")
    animation.toValue = CAShapeLayerLineCap.round
    animation.duration = 0.3

    //var progressLayer: CAShapeLayer?
    progressLayer?.add(animation, forKey: "AnimationKey")

Nothing happens. Probably the error is in keyPath, but a can’t find proper value

1 Answers
Best Answer
Avatarnaveen answered 5 months ago
Your Answer

1 + 2 =

Popular Tags

WP Facebook Auto Publish Powered By :