我开始使用基于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