Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Note:
I highly recommend that you read Section 1.15 before proceeding with this section of the book.
In order to rotate a view while animating it, you must apply a rotation transformation to it while in an animation block (see Section 1.13). Let’s have a look at some sample code which will make this clearer. Let’s say we have an image named Xcode.png (see Figure 1-14), and we want to display it in the center of the screen. After the image is displayed, we want to rotate it 90 degrees over a 5-second time period and then rotate it back to its original orientation. So when our view appears on the screen, let’s rotate the image view 90 degrees clockwise: