我无法将某个选项卡视图设置为 UiNavigation 控制器。我得到的警告是:
Pushing a navigation controller is not supported
这是我的代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIViewController *viewController1, *viewController2, *viewController3, *viewController4;
viewController1 = [[HomeViewController alloc] initWithNibName:@"HomeViewController_iPhone" bundle:nil];
viewController2 = [[SearchViewController alloc] initWithNibName:@"SearchViewController_iPhone" bundle:nil];
viewController3 = [[ListViewController alloc] initWithNibName:@"ListViewController_iPhone" bundle:nil];
viewController4 = [[InfoViewController alloc] initWithNibName:@"InfoViewController_iPhone" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
UINavigationController * listNavController = [[UINavigationController alloc] initWithRootViewController:viewController3];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, listNavController, viewController4, nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
}