我開始使用基於Window的模板,而這樣做是爲了達到同樣的目的。
我在我的應用程序委託中手動創建了我的NavigationControllers
和TabBarController
。
在你:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
補充一點:
//Seeting up the Navigation controllers and pushing our TableView controllers.
UINavigationController *unvc1 = [[UINavigationController alloc] init];
UINavigationController *unvc2 = [[UINavigationController alloc] init];
[unvc1 pushViewController:someViewController1 animated:NO];
[unvc2 pushViewController:someViewController2 animated:NO];
[someViewController1 release];[someViewController2 release];//Releasing our TableView controllers.
//Setting up the TabBar controller and pushing our Navigation controllers.
UITabBarController *tbvc = [[UITabBarController alloc] init];
tbvc.viewControllers = [NSArray arrayWithObjects:unvc1, unvc2, nil];
[unvc1 release];[unvc2 release]; //releasing our Navigation controllers.
我希望這有助於。
是否有Interface Builder解決方案? – Raptor
當然,但不幸的是我沒有與該模板一起工作,所以我就這樣設置它。我知道這不是你想要的,但它會幫助你前進。此外,任何'ViewController'被推入到'NavigationController'中,因此''TabBarConrtoller',可以用IB創建。 – rjgonzo