iphone - iOS Dismis 的 ViewController 堆栈

标签 iphone ios ios4

我正在开发一个iPhone应用程序,在其中我使用presentModalViewController方法将ViewController更改为最多2/3级(例如Home-->Option-->Other-->More)。

现在我想让我的应用程序返回到第一个屏幕或 ViewController。如果我使用missModalViewControllerAnimated方法,它只会关闭当前的 View Controller 。但我想清除堆栈并再次启动主屏幕。

感谢您的帮助。

最佳答案

为每个级别正确设置代表。因此,如果您在 More 中按 Cancel 或 Done,它将调用类似 [other moreViewDidCancel] 的内容,其中您将调用 dismissModalViewController:Animated: 并通知其父 View Controller (委托(delegate))应该解雇(so,[option otherViewDidCancel])等等直到顶层。

关于iphone - iOS Dismis 的 ViewController 堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8970382/

相关文章:

php - Apple 推送通知中的表情符号支持

android,主屏幕上的网络应用程序图标而不是通用图标,apple touche 图标 : apple-touch-icon-precomposed

iOS - UncaughtExceptions 全局异常处理程序不允许应用程序退出

ios - 无法从mainBundle中删除文件

iphone - 我们如何以编程方式启用/禁用默认的 iPhone 相机?

iphone - 按下主页按钮时如何终止进程?

ios - Xcode 找不到 iTunes Connect 配置文件?

ios - 在 Mixpanel 中执行过操作的用户

ios - SCNLevelOfDetails 委托(delegate)/通知

ios - 如何以编程方式在 UITableViewCell 上启用编辑模式?