The UIView animation block doesn’t limit you to a single change. Recipe 1
combines size transformations with transparency changes to create a
more compelling animation. It does this by adding several directives at
once to the animation block. This recipe performs five actions at a
time. It zooms and fades one view into place while zooming out and
fading away another and then exchanges the two in the subview array
list.

Notice how the viewDidLoad method prepares the back object for animation by shrinking it and making it transparent. When the swap: method first executes, that view will be ready to appear and zoom to size.

This recipe does wait for the animation to finish by providing a
delegate and a simplified callback that ignores the parameters of the
default callback invocation (animationDidStop:finished:context:). This code hides the bar button after it is pressed and does not return it to view until the animation completes.