Wrap up
Wrap up 관련
Core Animation is an extraordinary toolkit, and UIKit wraps it in a simple and flexible set of methods. And because it's so simple to use, you really have no excuse for not using it.
In this project you learned about the animate(withDuration:)
method of UIView
, spring animations, as well as alpha values and CGAffineTransform
.
Remember, animation isn’t just there to make our apps look pretty – it also helps guide the users eyes. So, if you're moving something around conceptually (e.g., moving an email to a folder, showing a palette of paint brushes, rolling a dice, etc) then move it around visually too. Your users will thank you for it!
Review what you learned
Anyone can sit through a tutorial, but it takes actual work to remember what was taught. It’s my job to make sure you take as much from these tutorials as possible, so I’ve prepared a short review to help you check your learning.
Challenge
One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try your new knowledge to make sure you fully understand what’s going on:
- Go back to project 8 and make the letter group buttons fade out when they are tapped. We were using the
isHidden
property, but you'll need to switch toalpha
becauseisHidden
is either true or false, it has no animatable values between. - Go back to project 13 and make the image view fade in when a new picture is chosen. To make this work, set the
alpha
to 0 first. - Go back to project 2 and make the flags scale down with a little bounce when pressed.