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.
Working with springs, part 1 - iOS Tutorial
From the course: Advanced iOS App Development: Core Animation
Working with springs, part 1
- [Instructor] Alright, so our fade in animation is nice and simple but I want our screen to have a little bit of dynamic movement. So we're gonna use a spring animation to move the sign in button up from off-screen bottom. Let's go into our SignInViewController and underneath the fadeInViews Let's make ourselves some room, declare new function called animateButtonWithSpring Again this is just for organization and to keep things a little easier to read. The first thing we need to do is create a spring animation instance. So we've already done this, so let's say, let moveUp we'll call it. And this is going to be of type CASpringAnimation Now a spring animation can be initialized with a key path just like a basic animation but we actually don't have the key path we need in our animation helper. So let's go back into the animation helper class. And say static var posY Because we want it to move up and down the y-axis and the string for this is position.y Now for our sign in view…
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
-
-
-
-
-
-