Graphics Programs Reference
In-Depth Information
The page sheet style is the same as the default full-screen style in portrait mode. In land-
scape mode, it keeps its width the same as in portrait mode and dims the left and right
edges of the presenting view controller's view that stick out behind it.
In ItemsViewController.m , modify the addNewItem: method to change the
presentation style of the UINavigationController that is being presented.
UINavigationController *navController = [[UINavigationController alloc]
initWithRootViewController:detailViewController];
[navController setModalPresentationStyle:UIModalPresentationFormSheet];
[self presentViewController:navController animated:YES completion:nil];
Notice that we change the presentation style of the UINavigationController , not
the DetailViewController , since it is the one that is being presented modally.
Build and run the application on the iPad simulator or on an iPad. Tap the button to add a
new item and watch the modal view controller slide onto the screen. Add some item de-
tails and then tap the Done button. The table view reappears, but your new BNRItem
isn't there. What happened?
Search WWH ::




Custom Search