Chapter 22. Popovers and Split Views

Popovers and split views are forms of interface that exist only on the iPad.

A popover is like a secondary window or dialog: it presents a view layered on top of the main interface. It does not dim out the rest of the screen like a modal view (if its presentation mode is UIModalPresentationPageSheet or UIModalPresentationFormSheet; see Chapter 19). It can be effectively modal, preventing the user from working in the rest of the interface, or it can vanish if the user taps outside it; or you can allow the user to tap some or all of the interface outside it without dismissing the popover.

A split view is a combination of two views, the first of which is the width of an iPhone screen (when the iPhone is held in portrait orientation). When the iPad is in landscape orientation, the two views appear side by side; when the iPad is in portrait orientation, only the second view appears, with an option to summon the first view as a popover.

Popovers may be thought of as a sort of compromise between the iPhone interface and the iPad interface. For example, in my LinkSame app, both the settings view (which allows the user to configure and begin a new game) and the help view (which describes how to play the game) are popovers (Figure 22-1). On the iPhone, both these views would occupy the entire screen; for each, we’d need a way to navigate to it and to return to the main interface when the user is finished with it (both would probably be modal views). But ...

Get Programming iOS 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.