我有 TabBarController 项目,带有导航栏。在导航栏上,我在右侧 BarButtonItem
上有弹出窗口。在那个弹出窗口 ViewController
上我有一个按钮。在那个按钮上单击我想移动到任何 TabBarController
。
我试过
tababarController.selectedIndex = 1
但是 View 没有切换
有什么解决办法吗?
最佳答案
您将关闭弹出窗口并调用委托(delegate)方法 从主视图 Controller 中的 popover viewcontroller 然后在您的委托(delegate)方法中设置工具栏的选定索引。
关于ios - 如何在快速单击弹出窗口 ViewController 上的按钮时导航到 TabBar ViewController?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35572290/