2012-01-10 100 views
0

我还是iphone应用程序的新手。开发。 ,我使用uiNavigationController创建了基于导航的应用程序,问题是当我选择导航控制器并将底部栏设置为制表符时,没有制表符出现,同样,当我添加uitabcontroller时没有出现制表符。如何添加制表符到UINavigationController

如何使用mainwindow.xib将选项卡添加到UINavigationController?链接,教程或任何建议?

回答

0

这里的一个示例代码,用于创建与两个控制器一个tabBarController作为选项卡:

myTabBarController = [[UITabBarController alloc] init]; 
NewsFeedController * newsFeedController = [[NewsFeedController alloc] initWithFacebook:facebook]; 
UINavigationController * navigationControllerHome = [[UINavigationController alloc] initWithRootViewController:newsFeedController]; 
[newsFeedController release]; 
AboutController * aboutController = [[AboutController alloc] init]; 
UINavigationController * navigationControllerAbout = [[UINavigationController alloc] initWithRootViewController:aboutController]; 
[aboutController release]; 
myTabBarController.viewControllers = [NSArray arrayWithObjects:navigationControllerHome, navigationControllerAbout, nil]; 
[self.window addSubview:myTabBarController.view]; 
相关问题