Chapter 22. Popovers and Split Views
Popovers and split views are forms of interface that exist only on the iPad.
A popover (managed by a UIPopoverController) is a sort of secondary window or dialog: it displays a view layered on top of the main interface. It is associated, through a sort of arrow, with a view in the main interface, such as the button the user tapped to summon the popover. It does not dim out the rest of the screen, like a presented view whose 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 popover, in effect, superimposes a roughly iPhone-sized screen on top of the iPad screen, and is useful in part precisely because it brings to the larger iPad the smaller, more lightweight flavor of the iPhone. For example, in my LinkSame app, both the settings view (where the user configures and begins 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 then to return to the main interface when the user is finished with it — both would probably involve presented view controllers. But with the larger iPad screen, that would make no ...
Get Programming iOS 5, 2nd Edition 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.