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.