I just wrapped up development on a Core Animation tutorial.
This project demonstrates a number of techniques for using Core Animation:
Using different animation timing functions like kCAMediaTimingFunctionLinear, kCAMediaTimingFunctionEaseIn, and kCAMediaTimingFunctionEaseInEaseOut to get different effects
Using CAKeyframeAnimation and a CGPath to animate a layer along a curved path (a figure 8).
Creating a custom subclass of UIView that has a CAShapeLayer as it's backing layer so you can draw shapes in a view "for free."
Adding a CGPath to a shape layer to draw shapes on the screen.
Using CAAnimationGroup to create a linked series of animations that run in sequence
Creating a very clean "per animation" completion block scheme using the fact that CAAnimation objects support the setValue:forKey: method. I add a code block to an animation object and set up the animation delegate's animationDidStop:finished method to check for a special key/value pair with the key kAnimationCompletionBlock.
Using the cumulative property on animations to create a single repeating animation that continuously rotates a layer by any desired amount.
Using a CATapGestureRecognizer to detect taps on a view.
Detecting taps on a view while it animates "live" by using the hitTest method of the view's presentation layer
The easiest thing to do, if you're not planning on pushing changes to the project, is to click the "ZIP" button, which downloads a zip version of the project without setting you up with GIT source control.
Here is a GIF of one of the animations it does:
Post edited by Duncan C on
Animated GIF created with Face Dancer, available for free in the app store.