我有一个基于标签栏的应用程序,具有以下标签结构:
Tab A - ATabViewController - enclosed by UINavigationController
Tab B - BTabViewController - enclosed by UINavigationController
在某些时候,单击位于导航堆栈中的视图中的按钮应该会弹出一些 CViewController,应该将其推送到 BTabViewController 中,这样它的后退按钮将显示 BTabViewController 的标题。
My question is
1. how to get the right navigation controller to call the pushViewController:CViewController?
2. The tab B still wasn't tapped at this point, so the question is whether I have to load it manually?
It's wired in the MainMenu.xib to load BTabViewController's xib
我试过以下:
[[appDelegate tabBarController] setSelectedIndex:BTab_Index];
[[appDelegate tabBarController].selectedViewController pushViewController:CViewController animated:YES]
它确实显示了 CViewController,但似乎搞砸了一些东西,所以后退按钮显示 CViewController 的标题,当按下时显示 CViewController 和 BTabViewController 的部分混合在一个视图中......
谢谢