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 > Recipe: Creating a Customizable Paged Scroller

Recipe: Creating a Customizable Paged Scroller

Listing 9-1 introduced a basic paged scroller but didn’t add any dynamic interaction to the equation. That example started and ended with three pages. In real life, page controls are far more useful when you can add and delete pages on the fly. Recipe 9-8 does exactly that. It adds buttons that build and remove views for the UIScrollView.

This approach uses not two but four separate controls to produce the add-and-remove interface of Figure 9-11. The four buttons include an add button built using the standard Contacts Add button style, a delete button that mimics that style, a confirm button that looks like an “X,” which is built to fit over the delete button, and a full-screen, completely clear cancel 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