ios - 将导航堆栈移动到更多选项卡

标签 ios uinavigationcontroller uikit uitabbarcontroller

我在 UITabBar 的某个选项卡上有一个 UINavigationController。当我向下钻取导航 Controller tableViews,将其移动到更多选项卡,然后在更多列表的 tableview 中选择条目时,我得到了在我离开我移动的选项卡时可见的 viewController。单击后退按钮使我返回到更多列表,不可能返回到初始 Root View Controller 。

当我点击更多列表中的项目时让 Root View Controller 出现对我来说是完全可以的,但是我不知道当我的 View Controller 被移动时如何得到通知,因为我正在开发一个库,因此没有对 TabBarController 的引用。

最佳答案

其中一种方法是在 UITabBarViewController 委托(delegate)中实现 tabBarController:willEndCustomizingViewControllers:changed: 方法。并注意它。如果发生这种情况,请重置您的 viewController 和 navigationViewController。这将删除您的 UINavigationController 堆栈,但应用程序将正常工作。

关于ios - 将导航堆栈移动到更多选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8844753/

相关文章:

iphone - UINavigationController NIB 要求文件所有者拥有 View ?

ios - 在整个应用程序中显示 View Controller

iphone - 嵌套的 UIScrollViews 同时滚动

html - iOS-如何在横向中生成PDF

ios - Xcode 7 不会从在 Xcode 6 中构建有效存档的同一项目构建有效存档

ios - UILabel 中的 HTML 格式 (iOS)

iPhone SDK - 大 UITableViewCell

ios nsdictionary 低 平均 高

swift - UINavigationController 的 subview 没有 UINavigationItem 来设置标题

ios - UIView 作为 SCNGeometry 的漫反射 Material 故障