Using UIScrollView

When you want to let the user scroll around your view, you typically make your view the subview of a UIScrollView, as shown in Figure 6.11.

Figure 6.11  Object diagram

Object diagram

Scroll views are typically used for views that are larger than the screen. A scroll view draws a rectangular portion of its subview, and moving your finger, or panning, on the scroll view changes the position of that rectangle on the subview. Thus, you can think of the scroll view as a viewing port that you move around a virtual world (Figure 6.12). The size of the scroll view is the size of this viewing port. The size of the area it can view is the UIScrollView ...

Get iOS Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.