Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

6. Assembling Views and Animations > Recipe: Bouncing Views as They Appear

Recipe: Bouncing Views as They Appear

Apple often uses two animation blocks, one called after another finishes, to add bounce to their animations. For example, they might zoom into a view a bit more than needed and then use a second animation to bring that enlarged view down to its final size. Using “bounces” adds a little more life to your animation sequences, providing an extra physical touch.

When calling one animation after another, be sure that the animations do not overlap. The previous edition of this book covered blocking modal animations; however, since iOS introduced completion block support, it is now far easier to use a nested set of animation blocks with chained animations in the completion blocks. Recipe 6-12 uses this new approach to bounce views slightly larger than their end size and then shrink them back down to the desired frame.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial