Chapter 14. Building Cinematic UIs with Core Animation
In This Chapter
Using UIView class methods to animate user interface elements |
Using CALayer to do more complex keyframe animation |
Using UIImageView animated images to display rendered animations |
One of the cornerstones of the iPhone UI is its use of animation to build what Apple calls a "Cinematic User Experience." A cinematic user experience is essentially one where the user elements don't simply pop into view; instead, they slide, fade, and otherwise transition into position using animation. The judicious use of animation provides what can only be described as a certain weight to the user interface elements. They feel more realistic because of the use of animation. This results in a UI that is more intuitive, and easier to use.
Because of the ubiquity of animation in iPhone OS, Apple has provided you with several very convenient APIs for using animation within your own applications.
In this chapter, I'll talk about each of these techniques, and see how you can apply them in your own applications.
Using the UIViews Animation Methods
The first, and simplest, method for doing animation in iPhone OS 3 is by using the capabilities built right into the UIView
class.
The UIView
class contains several class methods that you can use to do simple animations of your views. Because all user interface elements inherit from UIView
, this means that this capability is already built into all of your apps; you need only utilize it, and utilizing it ...
Get Cocoa Touch™ for iPhone® OS 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.