What's the easiest way to animate a line?
I am creating an app that involves animating lines within a workspace over time. My current approach for this is to use code like this in drawRect : CGContextSetStrokeColor(context, black); CGContextBeginPath(context); CGContextMoveToPoint(context, startPoint.x, startPoint.y); CGContextAddLineToPoint(context, finalPoint.x, finalPoint.y); CGContextStrokePath(context); ...and then just setting a timer to run every 0.05 seconds to update finalPoint and call setNeedsDisplay . I'm finding this approach (when there's 5ish lines moving at once) slows down the app terribly, and even with such a high