0
有人能指出我如何在UITabBarController裏面設置UINavigationController的方向嗎?我有一種感覺,我使用initWithRootViewController錯誤。UITabBarController裏面的UINavigationController問題
ViewController1 *viewController1 = [[[ViewController1 alloc] initWithNibName:@"ViewController1" bundle:nil] autorelease];
self.navController = [[[UINavigationController alloc] initWithRootViewController:viewController1] autorelease];
ViewController2 *viewController2 = [[[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil] autorelease];
ViewController3 *viewController3 = [[[ViewController3 alloc] initWithNibName:@"ViewController3" bundle:nil] autorelease];
ViewController4 *viewController4 = [[[ViewController4 alloc] initWithNibName:@"ViewController4" bundle:nil] autorelease];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
_tabBarController.viewControllers = [NSArray arrayWithObjects:navController, viewController2, viewController3, viewController4, nil];
self.tabBarController.delegate = self;
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
感謝您的任何提示球員。
感謝您的回覆阿爾貝託。當我回到這個問題並回報時,我會進行測試。 – crewshin 2012-02-28 19:21:24