Animate a line using CADisplayLink
A CADisplayLink object is a timer object that allows your application to synchronize its drawing to the refresh rate of the display or screen.
In below example I have simply used CADisplayLink to animate a line extending across screen on CALayer using it’s drawInContext: method.