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
(soothing music) - [Instructor] Alright, I'm gonna jump right in, and underneath animate button with spring, gonna make myself some new room, create a new function, called animate button click. Inside, I'm going to say let pop equals C.A. spring animation, key path, animation helper dot scale. Now, I don't want the button effect to be overpowering, but at the same time, I want it to be noticeable, so I'm gonna set the from value to one point two, which will be an increase of 20%. For the two value, I just want it to pop back to which original scale of one. Remember that it's easiest to use the from value as the change you wanna see in your animation, and the two value as your final destination, which works out really well here. For the duration, I'm gonna say, pop duration equals pop dot settle in duration. Now let's set the spring specific properties. I want the initial velocity to be a little bit more than its default, so I'm gonna say it's gonna be two. I want it to be slightly…
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
-
-
-
-
-
-