From the course: Advanced iOS App Development: Core Animation
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Reusing animations - iOS Tutorial
From the course: Advanced iOS App Development: Core Animation
Reusing animations
- [Instructor] To get a handle on how reusing layer animation works. We're going to add the fade animation on the username and password text fields. And for a bit more effect will add in delays for each of the animations. For all let's do a little bit of refactoring and organization. Gonna cut and copy the code we wrote from the last video. And under the animations mark, just gonna create a new function, called fade in views. It's not gonna return anything. It's just for organization. And I'm going to call this in view did appear, So this way we have all of our first animation code right in one place where we can look at it. Now as you might of guessed since our fade animation is an object and it's copied. Whenever it's added to a layer we can reuse it simply by adding the animation object to another view. So right after our tile label dot layer add we're gonna say username field dot layer dot add. And we're just gonna add fade to it again with a key of nil. We're gonna do the same…
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
-
(Locked)
Reusing animations4m 30s
-
(Locked)
Using fill modes1m 52s
-
(Locked)
Working with springs, part 13m 52s
-
(Locked)
Working with springs, part 24m 1s
-
(Locked)
Understanding the presentation layer3m 37s
-
(Locked)
Keys and delegates, part 16m 58s
-
(Locked)
Keys and delegates, part 26m 11s
-
(Locked)
Easing and looping animations4m 17s
-
(Locked)
Chapter challenge1m 33s
-
(Locked)
Solution2m 7s
-
-
-
-
-
-