O'Reilly logo

The Core iOS Developer’s Cookbook, Fifth Edition by Rich Wardwell, Erica Sadun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe: Image Gallery Viewer

Recipe 2-10 uses a UIScrollView instance to display multiple images, as shown in Figure 2-10. Users can scroll through the pictures using swipes, and the page indicator updates accordingly. Similarly, users can tap on the page control, and the scroller animates the selected page into place. This two-way relationship is built by adding a target-action callback to the page control and a delegate callback to the scroller. Each callback updates the other object, providing a tight coupling between the two.

Image

Figure 2-10 In iOS 7, content is king. The only interface elements that are visible include the page control and the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required