我在 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/