Episode #448

Animatable Modifiers

17 minutes
Published on July 16, 2020

This video is only available to subscribers. Get access to this video and 584 others.

Animating in SwiftUI can seem like magic, until you want to animate something custom. In this episode we'll add animation to our frequency, amplitude, and phase parameters for our waveform by leveraging SwiftUI's AnimatableModifier protocol. We'll see how to implement the animatableData property with one, two, and ultimately all three parameters. We'll cover implicit and explicit animations, as well as the behavior when attempting to mix animations.

This episode uses Swift 5.3, Ios 14.0-beta2, Xcode 12-beta2.