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

Chapter 6. Assembling Views and Animations > Recipe: Image View Animations

Recipe: Image View Animations

In addition to displaying static pictures, the UIImageView class supports built-in animation. After loading an array of images, you can tell instances to animate them. Recipe 6-13 shows you how.

Start by creating an array populated by individual images loaded from files and assign this array to the UIImageView instance’s animationImages property. Set the animationDuration to the total loop time for displaying all the images in the array. Finally, begin animating by sending the startAnimating message. (There’s a matching stopAnimating method available for use as well.)


  

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