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

CAShapeLayer animate lineCap property

HomeCategory: stackoverflowCAShapeLayer animate lineCap property
bhawya asked 2 weeks 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
naveen answered 2 weeks ago
Your Answer

6 + 8 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com