10. Easing

In life, as in art, the beautiful moves in curves.

Edward G. Bulwer-Lytton

In Chapter 9, “Layer Time,” we discussed animation timing and the CAMediaTiming protocol. We now look at another time-related mechanism—a system known as easing. Core Animation uses easing to make animations move smoothly and naturally instead of seeming robotic and artificial, and in this chapter we explore how to control and customize the easing curves for your animations.

Animation Velocity

Animation is the change of a value over time, and that implies that the change must happen at a particular rate or velocity. The velocity of an animation is related to its duration by the following equation:

velocity = change / time

The change would be (for example) ...

Get iOS Core Animation: Advanced Techniques 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.