我有一个带有 3 个 View 的导航应用程序,在第二个 View 中,我想添加一个 tarbarcontroller
并控制另外两个 View ,我该怎么做?
最佳答案
假设您有一个 tabBarController ,其中包含两个选项卡:controller1 和 controller1,只要您愿意就可以推送它。
UITabBarController * tabBarController = [[UITabBarController alloc] init];
UIViewController * controller1 = [[UIViewController alloc] init];
UIViewController * controller2 = [[UIViewController alloc] init];
tabBarController.viewControllers = [NSArray arrayWithObjects:controller1, controller2 nil];
[controller1 release];
[controller2 release];
[self.navigationController pushViewController:tabBarController animated:YES];
[tabBarController release];
关于ios - 如何将 tabbarcontroller 添加到导航应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8264612/