iphone - "Warp"到 iPhone iOS 查看

标签 iphone ios uinavigationcontroller logout

我目前正在开发一个基于导航 Controller 的应用程序。但是,当用户注销时,我想转到初始屏幕并销毁所有其他堆叠的 View 。最好的方法是什么?

编辑:

我已经尝试按照两个答案的建议进行操作,但我得到了一个 nil navigationViewController。所以我将添加另一个我以前认为没有用的细节。实际上,我正在尝试从嵌入在 NavigationController 中的 TabViewController 执行此操作。如果这有任何改变,我深表歉意。

最佳答案

[self.navigationController popToRootViewControllerAnimated:YES];

关于iphone - "Warp"到 iPhone iOS 查看,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10592597/

相关文章:

ios - 登录 ios 的 UINavigationController 流程

ios - 将自定义字体嵌入从iPad应用程序生成的PDF中

ios - 消除重复代码 Swift 3

ios - iPhone : Photos framework : how to get only those album/images which created by my app only not by others?

ios - 从选定的帐户SLComposeViewController获取Twitter详细信息

iphone - 在 iPhone 中将事件添加到默认日历时出错

iphone - 从 UIView 推送 UIViewController

iphone - 如果 iWork 文档基于 XML,但 iOS 不支持 XML 持久性,那么 iPad 版 iWork 应用程序又如何呢?

ios - Swift if let 语句导致 <<error type>> 而不是自定义对象

swift - 如何在导航 Controller 中设置后退按钮的大小