Recipe: Key Frame Animations

While nested animation blocks and completion blocks can be used to create fairly advanced animations, the complexity can become overwhelming quickly. In iOS 7, Apple introduced key frame animations to UIKit, powerful animations that are suited for advanced needs. These animations vastly simplify creating complex effects such as the bounce in Recipe 4-10. Key frame animations previously required diving into Core Animation, but now, this powerful animation tool is available directly from UIView.

In traditional key frame animation, you provide the important frames of the animation sequence and their expected timestamps within the animation, and the system is responsible for rendering all the in-between frames to provide ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.