For the More Curious: The Presentation Layer and the Model Layer

You can think of an instance of CALayer as having two parts: the content that gets composited onto the screen, and a set of parameters that describe how it should be composited: opacity, transform, position, etc. When a layer is being animated, it actually has two copies of these parameters: the model version and the presentation version. The presentation parameters are the ones that are being smoothly changed by the animation object. The model parameters are the persistent ones – the ones that will be used once the animation is over.

So, when a layer is being animated, its content is composited to the screen using the presentation parameters. When it is animation-less, the model ...

Get iOS Programming: The Big Nerd Ranch Guide, Second Edition 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.