【发布时间】:2011-08-02 04:15:07
【问题描述】:
我正在尝试将 TTThumbsViewController 放在 UITabBarController 中,但是当我这样做时,TTThumbsViewController 的 NavigationBar 不显示。 NavigationBar 应该在的地方只有空白。我自己只加载了 TTThumbsViewController,而 NavigationBar 加载得很好。我确定我只是错过了一个设置,但我不知道它是什么。
这是我创建 UITabBarController 和 TTThumbsViewController 的方法:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.tabBarController = [[UITabBarController alloc] init];
ThumbsViewController *thumbsViewController = [[ThumbsViewController alloc] init];
UITabBarItem *thumbsTabBarItem = [[UITabBarItem alloc] initWithTitle:@"Thumbs" image:[UIImage imageNamed:@"icon.png"] tag:Thumbs];
thumbsViewController.tabBarItem = thumbsTabBarItem;
self.tabBarController.viewControllers = [NSArray arrayWithObjects:thumbsViewController, nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
}
【问题讨论】:
标签: iphone uitabbarcontroller three20 ttthumbsviewcontroller