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
  • PrintPrint
Share this Page URL
Help

9. Building and Using Controls > Adding Animated Elements to Buttons

Adding Animated Elements to Buttons

When working with buttons, you can creatively layer art in front of or behind them. Use the standard UIView hierarchy to do this, making sure to disable user interaction for any view that might otherwise obscure your button (setUserInteractionEnabled:NO). Figure 9-7 shows what happens when you combine semitranslucent button art with an animated UIImageView behind it. The image view contents “leak” through to the viewer, enabling you to add live animation elements to the button.

Image

Figure 9-7. Combine semitranslucent button art with animated UIImageViews to build eye-catching UI elements. In this concept, the butterfly flaps “within” the button.


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint