SwiftUI is a modern cross-platform declarative UI framework from Apple. SwiftUI supports all Apple platforms so, as a cool bonus, you can apply anything you learn in this section to any of your tvOS, macOS, iPadOS and watchOS apps!
In this section, you’ll work through several different animations including some beautiful thumbnail zoom transitions and a modern-looking SwiftUI spinner.
You will continue to learn more about various view properties you can easily animate with SwiftUI. Additionally you will learn about view transitions and gesture driven interactive animations.
Section II: View Animations
This section will introduce you to the animation API of UIKit. Though simple to use, the UIKit animation API provides you with lots of flexibility and power to handle most, if not all, of your animation requirements.
Animations are visible, onscreen effects that apply to all of the views, or visible objects, in your user interface. You can animate any object onscreen that ultimately inherits from UIView. This includes UILabel, UIImageView, UIButton and any custom classes you’ve created yourself.
You’ll use keyframe animations to unlock the ultimate achievement of an impressive UI: creating elaborate animation sequences built from a number of distinct stages.
Section III: Auto Layout
You’ll need a slightly better understanding of the Auto Layout paradigm than the average iOS developer to make your animations play nicely with Auto Layout. Fortunately, you’ll find working with Auto Layout constraints in code isn’t as hard as it sounds at first. In fact, it’s a fairly straightforward process once you work through a few examples.
By the end of this section, you’ll have tamed Auto Layout and will know how to bend it to your will to create some really amazing animations.
Once you’ve worked through the project in Chapter 8, you’ll add a number of animations to it and put your newfound knowledge to good use.
Section IV: Layer Animations
In this section of the book, you’ll learn about animating layers instead of views and how to use special layers. A layer is a simple model class that exposes a number of properties to represent some image-based content. Every UIView is backed by a layer, so you can think of layers as the lower-level behind-the-scenes class behind your content.
By the end of this section, you will know how — and when! — to animate your views, and when it’s appropriate to use layers.
Here you’ll learn about layer keyframe animations, which are powerful and slightly different than view keyframe animations. There’s some special handling around animating struct properties, which you’ll also learn about.
Learn about the little known but powerful CAReplicatorLayer class.
Section V: View Controller Transition Animations
It’s time to learn how to use UIKit and Auto Layout animation techniques in the broader context of app navigation and layout. You’ve animated multiple views and layers already, but now you’ll take a bigger-picture perspective and think about animating entire view controllers!
Implementing custom view controller transitions takes some coding, but the results are lots of fun to look at and use. No matter which API you use, custom transitions are an important animation technique that really make an app stand out!
Learn how to make the reveal transition interactive: the user will be able to scrub back and forth through the animated transition!
Section VI: Animations With UIViewPropertyAnimator
UIViewPropertyAnimator is a class that helps developers create interactive, interruptible view animations.
You could do everything you learned so far in the book by using a combination of layer and view animations, but UIViewPropertyAnimator wraps a number of APIs together conveniently in the same class, which makes it a bit easier to use.
After working through this section, you’ll definitely be at home with using UIViewPropertyAnimator for all kinds of animations in your apps!
Create custom View Controller transitions using a UIViewPropertyAnimator to drive the transition animations. You will create both static and interactive transitions.
Section VII: 3D Animations
Core Animation helps you float free from the two dimensional world of your app’s UI. Although it isn’t a true 3D framework, Core Animation has a lot of smart features to help you position two-dimensional objects in 3D space.
In the next two chapters, you’ll learn how to set up your layers in 3D space, how to choose the distance from the camera to your layer and how to create animations in your 3D scene.