【发布时间】:2011-06-06 09:40:08
【问题描述】:
我已经搜索和搜索,但仍然无法解决这个问题! :-(
我的 main.xib 中有一个 TabBarController,它由五个 viewControllers 设置。
我正在尝试让第一个视图控制器成为导航控制器,这样如果选择了第一个选项卡,我就可以将视图推送和弹出视图。
但是对于我的生活,我无法让它工作?
我在我的应用委托 didLaunch 方法中尝试了这个:
UITabBarController *tabBarController = [[UITabBarController alloc] init];
tabBarController.delegate=self;
FirstViewController *first = [[FirstViewController alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]];
UINavigationController *firstNav = [[UINavigationController alloc] initWithRootViewController:first];
NSArray* controllers = [NSArray arrayWithObjects:firstNav, nil];
tabBarController.viewControllers = controllers;
[window addSubview:tabBarController.view];
我看到我的视图显示但标签栏上没有按钮?
请给点小费??谢谢
【问题讨论】:
标签: iphone uinavigationcontroller uitabbarcontroller uitabbaritem