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.
Solution - iOS Tutorial
From the course: Advanced iOS App Development: Core Animation
Solution
- [Instructor] All right, I'm gonna get started right away and just create a new method underneath our bounce keyframe animation. I'm gonna call this rotate keyframe, and it's going to return a CA keyframe animation. Now let's say let, we're gonna name this animation rotate, of type CA keyframe animation, and the key path is gonna be AnimationHelper.rotation, which is what we added from the last video. Now, this animation is gonna go into an animation group as our second task, so all we need to do here is set its values and key times. So rotate.values equals, I'm gonna go up to my comment and cut the rotation values from the last video, and I'm just gonna paste those in. Now for the key times, I am going to start off with 0.0, then a quarter, then a half, three quarters, and end with one. And finally, I'm just gonna return rotate. With that done, I'm gonna go back up to view did appear, and right underneath our loading label layer add, I'm gonna create a new CA animation group called…
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.