9.4 · Implicit and explicit animation, UIView animation, and animators

Every UIKit animation ends up as a Core Animation animation on a layer. Once you know the model-versus-presentation rule, the different APIs are just different ways of saying the same thing.

Mental model. You change a model value; Core Animation animates the presentation toward it. The APIs differ only in who creates the animation and how much control you get.

Core Animation and UIKit

Implicit, explicit and the UIView wrappers.

  1. How do implicit and explicit animations differ in Core Animation, and how does CATransaction fit in? 9.4.1 · L3
    An implicit animation happens automatically: change an animatable property of a standalone CALayer and Core Animation animates from the old to the new value…
  2. How do UIView.animate, UIViewPropertyAnimator and SwiftUI’s animations relate, and when do you pick each? 9.4.2 · L3
    UIView.animate(withDuration:…) (and its spring, keyframe and transition variants) is the simplest: set the end state inside the closure, and UIKit creates the…

More in Layout, rendering & animation