[我加導航控制器到我的標籤欄項目,它是可以正常使用
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
UIViewController *viewController1 = [[[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil] autorelease];
UIViewController *viewController2 = [[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil] autorelease];
UIViewController *viewController3 = [[[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil] autorelease];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = @[viewController1, viewController2,viewController3];
self.navigationController= [[UINavigationController alloc]initWithRootViewController:self.tabBarController];
// self.window.rootViewController = self.tabBarController;
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
我想你應該把動畫:是的。因爲大部分時間。我們想在移動到新視圖之前控制器動畫。謝謝 :) – hqt