In another question, how to animate was answered: Draw line animated
I then tried to add a view to animate simultaneously. I want to create two animated paths that meet at the same CGPoint
but have different paths to get there. I want both paths to start at the same time and end animation at the same time. My current approach is to create a second UIBezierPath
called path2, along with a second CAShapeLayer
called shapeLayer2
, but the second path is just overriding the first. I'm pretty sure both paths need different CAShapeLayer
s because each path will have different attributes. It seems like I then need to add the CAShapeLayer
instance as a view.layer
sublayer but it doesn't seem to be working. What should I be doing differently to achieve the desired result?
Here is what ultimately worked.