From the course: Advanced iOS App Development: Core Animation
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Understanding the presentation layer - iOS Tutorial
From the course: Advanced iOS App Development: Core Animation
Understanding the presentation layer
- [Instructor] Now that we've got some animation code under our belts, it's important that we talk about what's actually happening when a layer animation plays. Let's take the title label as an example. Go up to view will appear and underneath the sign in button round method, let's just change the title label's alpha to zero. So we'll say titleLabel.alpha = 0.0. And let's run this and see what happens. Alright so that's funny, our animation plays and then our title label's alpha is back at zero. So this is happening because when an animation starts the object or view we're animating is actually replaced or overlaid by a cached copy of itself which is called the presentation layer. The presentation layer is what's actually animating and it's removed when the animation finishes. Again showing the original real view as it appeared before the animation. Now if it helps you can think of the presentation layer as an imposter layer; it makes more sense. So let's run our app one more time and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Simple layer animation4m 20s
-
Reusing animations4m 30s
-
Using fill modes1m 52s
-
Working with springs, part 13m 52s
-
Working with springs, part 24m 1s
-
Understanding the presentation layer3m 37s
-
Keys and delegates, part 16m 58s
-
Keys and delegates, part 26m 11s
-
Easing and looping animations4m 17s
-
Chapter challenge1m 33s
-
Solution2m 7s
-
-
-
-
-
-