Follow along at https://www.hackingwithswift.com/100/swiftui/32.
This day covers Part One of Project 6: Animation
in the 100 Days of SwiftUI Challenge.
It focuses on several specific topics:
- Animation: Introduction
- Creating implicit animations
- Customizing animations in SwiftUI
- Animating bindings
- Creating explicit animations
From the description:
In this technique project we’re going to look at a range of animations and transitions with SwiftUI.
With the .animation()
modifier, we can essentially place a "hook" into our composed view that tells SwiftUI to animate any animatable properties of this view declared above the modifier. Pretty handy.
The spirit of an animation lies in its easing function. Fortunately, SwiftUI gives us plenty of tools to craft easing functions in the argument that we pass to .animation.
SwiftUI animates by drawing a series of views that "interpolate" between the animation start and end state within a specified duration.
Naturally, this built-in view drawing is a perfect match for reactive view bindings.
- One of My Favorite Books: The Animator's Survival Kit
- Playing with SwiftUI Buttons