博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

How View Controllers Present Other View Controllers

Posted on 2012-12-24 10:46  酸梅拯救地球  阅读(220)  评论(0)    收藏  举报

1.When you present a modal view controller, the system creates a relationship between the view controller that did the presenting and the view controller that was presented. Specifically, the view controller that did the presenting updates its presentedViewController property to point to its presented view controller. Similarly, the presented view controller updates its presentingViewController property to point back to the view controller that presented it.

 

 

 

 

2.  important

if the user cancels the current operation, you can remove all objects in the chain by dismissing the first presented view controller. Dismissing a view controller dismisses not only that view controller but also any view controllers it presented.

3.You can present UINavigationControllerobjects in the same way that you would present a content view controller.

    When presenting a navigation controller, you always present the UINavigationController object itself, rather than presenting any of the view controllers on its navigation stack. However, individual view controllers on the navigation stack may present other view controllers, including other navigation controllers.

4. Interactions with the system view controllers typically take place through a delegate object.

 

http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html#//apple_ref/doc/uid/TP40007457-CH111-SW1