9. Layer Time
The biggest difference between time and space is that you can’t reuse time.
In the previous two chapters, we explored the various types of layer animation that can be implemented using
CAAnimation and its subclasses. Animation is a change that happens over time, so timing is crucial to the whole concept. In this chapter, we will look at the
CAMediaTiming protocol, which is how Core Animation keeps track of time.
The CAMediaTiming Protocol
CAMediaTiming protocol defines a collection of properties that are used to control the passage of time during an animation. Both
CAAnimation conform to this protocol, so time can be controlled on both a per-layer and per-animation basis.