Why not use Arc for this?
Sorry if an issue is the wrong way to ask this, but why do you not use the arc feature of Core Animation? Something like a CAShapeLayer with a CGPath drawn with CGPathAddArc.
I'm sorry, this sample code is almost two years old and contains five different projects. What project and what part of the code are you referring to?
Sorry! Pie Chart Animation Progress project. You draw the pie (a circle and its progress states) by rounding the corners of a square rectangle until its a circle and then somehow transferring this to a UIBezier that you then part draw from 1 to 0 to animate the pie segment.
You could just as well use an arc and the CGPath API right away. Since this is sample code which focuses on the stroke animation I tried to keep the path creation as simple and easy to understand as possible. I believe that the UIBezierPath API looks friendlier when you see it the first time and that since people often use cornerRadius to create circular layers, a rounded rectangle is a very familiar concept.
If I would write a similar component for myself or with the purpose of being a reusable control (as opposed to sample code for learning purposes) I would probably have used CGPathAddArc directly.
Thanks, very much! I thought there might be some intrinsic performance advantage I'm not aware of as I'm very new to Core Animation. Thanks for your time, and for this and many other of your efforts on SO. They've been incredibly insightful.