Graphics Programs Reference
In-Depth Information
tailViewController is presented modally, it covers up the navigation bar. If the
ItemsViewController was handling the modal presentation, then the De-
tailViewController 's view would fit within the view of the ItemsViewCon-
troller , and the navigation bar would not be obscured.
For the purposes of presenting and dismissing modal view controllers, this doesn't matter;
the modal view controller doesn't care who its presentingViewController is as
long as it can send it a message and get dismissed. But, we shouldn't lie to you (sorry
about that), so we'll go into the fascinating details of view controller relationships at the
end of this chapter.
Modal view controller styles
On the iPhone or iPod touch, a modal view controller takes over the entire screen. This is
the default behavior and the only possibility on these devices. On the iPad, you have two
additional options: a form sheet style and a page sheet style. You can change the presenta-
tion of the modal view controller by setting its modalPresentationStyle property
to a pre-defined constant - UIModalPresentationFormSheet or
UIModalPresentationPageSheet .
The form sheet style shows the modal view controller's view in a rectangle in the center
of the iPad's screen and dims out the presenting view controller's view ( Figure 13.5 ).
Figure 13.5 An example of the form sheet style
 
Search WWH ::




Custom Search