问题描述
当 这只是为了显示模态视图,因此也可以通过调用堆栈能否从第一个推视图回来? Woooaaaaaa ..... 我猜这里的差异在别处和更深。否? 最重要的区别是语义。模态视图控制器通常指示用户必须提供一些信息或做某事。此链接更深入地说明了此问题: 这里是另一个更抽象的区别: 当你提供一个模态视图控制器时,系统会在呈现的视图控制器和呈现的视图控制器之间创建一个父子关系,具体来说,它的modalViewController属性指向它的呈现(子)视图控制器。类似地,呈现的视图控制器更新其parentViewController属性以指向呈现它的视图控制器。 另请参阅此主题: What is the difference beetween calling Is this just to be able to go back from the first pushed view ? Woooaaaaaa..... I guess the difference is elsewhere and deeper. No ? The most important difference is about semantics. Modal view controllers typically indicate that the user has to provide some information or do something. This link explains it more in depth: http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html Here's another, less abstract difference they talk about: "When you present a modal view controller, the system creates a parent-child 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 modalViewController property to point to its presented (child) view controller. Similarly, the presented view controller updates its parentViewController property to point back to the view controller that presented it." Also see this thread: why "present modal view controller"? 这篇关于iOS - pushViewController与presentModalViewController的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
$ <$ p <$ p <$ p <$ <$ p <$ p <$ < b $ b
presentModalViewController
and pushViewController
, when :