From the course: Learning iOS Animations with UIKit

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Chapter solution

Chapter solution - iOS Tutorial

From the course: Learning iOS Animations with UIKit

Start my 1-month free trial

Chapter solution

- [Lecturer] Before we jump into the solution here, you might have noticed an error with the image views offset in the screen top keyframe. The offset is being applied to the x axis, but since this is the top of the screen, we need the image view to be offset on the y axis instead. Now, with that fixed, let's go down to the bottom of our animate keyframes and add in a new comment. I'm going to say this is our Bottom and we're going to add a new UI view. Add keyframe with relative start time, it's going to be .75, relative duration is .25 and for the animations, there are two ways of going about this, as I mentioned. So, we're going to go through the first one by using our screen Bottom property on our Animation Manager. So, let's just say, self.animationTarget.center= AnimationManager screen bottom and we will apply the offset, so, self.animationTarget.center.y minus =self.targetOffset. Now, the second option I mentioned is to store a local variable at the top of the function, so…

Contents