我有以下问题:我的tabBar的设计设置在AppDelegate.m中:
self.tabBarController = (UITabBarController*)self.window.rootViewController;
UITabBar *tabBar = self.tabBarController.tabBar;
UITabBarItem *tabBarItem1 = [tabBar.items objectAtIndex:0];
tabBarItem1.title = @"Start";
// ...
[tabBarItem1 setFinishedSelectedImage:[UIImage imageNamed:@"start_selected.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"start.png"]];
// ...但是在第一次引入pageViewController (通过警报在我的tabBarController中打开)之后,用户返回到tabBarController。但是我所有的appDelegate表格设置都没了.
...method返回到tabBarController:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MyStoryboard" bundle:nil];
TabBarViewController *vc = (TabBarViewController *)[storyboard instantiateViewControllerWithIdentifier:@"TBVC"]; //this is the tabBarController in the InterfaceBuilder
[self vc animated:YES completion:nil];更新
...I在appDelegate中打开介绍:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[IntroViewController alloc] initWithNibName:@"IntroViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];也许有人能帮我,我希望我的第一个问题不是那么糟糕。
发布于 2013-08-04 14:09:47
返回时,您将实例化一个新的tabBar控制器。这意味着它将不是您用自定义设置配置的相同的设置。
相反,不要理会警报或任何你正确显示的东西。
https://stackoverflow.com/questions/18043724
复制相似问题