18. Core Animation Layer

One of the things that makes iPhone interfaces so beautiful is the use of animation. When used properly, animation can increase the functionality of an application by giving the user visual cues about the application’s workflow. On the iPhone, the Core Animation API contains the classes and functions needed to animate an application’s interface.

On the iPhone, the Core Animation API contains the classes and functions needed to animate an application’s interface.

There are two classes that make Core Animation work: CALayer and CAAnimation.

CALayer is, at its core, a buffer containing a bitmap. When you draw a layer (or, more importantly, a stack of layers), the rendering is hardware-accelerated. This makes drawing a layer ...

Get iPhone Programming: The Big Nerd Ranch Guide 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.