我写的这个应用程序有一个问题.
我正在UITabBar我的应用程序窗口中设置并在视图文件中设置图标.但是,当我运行应用程序时,第一个图标显示(因为视图已加载,我猜),其他图标在我点击它们之前不会显示.
我需要用self.tabBarItem其他方法实现viewDidLoad吗?
在此先感谢大家!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
tabBar = [[UITabBarController alloc] init];
SubscriptionsController *subscriptionsController = [[SubscriptionsController alloc] init];
FavoritesController *favoritesController = [[FavoritesController alloc] init];
CategoriesController *categoriesController = [[CategoriesController alloc] init];
TagsController *tagsController = [[TagsController alloc] init];
HelpScreenController *helpScreenController = [[HelpScreenController alloc] init];
tabBar.viewControllers = [NSArray arrayWithObjects:
subscriptionsController,
favoritesController,
categoriesController,
tagsController,
helpScreenController,
nil
];
[window addSubview:tabBar.view];
// Override point for customization after application launch.
[window makeKeyAndVisible];
return YES;
}
//The View
- …Run Code Online (Sandbox Code Playgroud)