私は次の問題を抱えています: 私のタブバーのデザインは 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"]];
// ...
しかし、アラートによって私の tabBarController で開かれる最初の紹介 pageViewController の後、ユーザーは tabBarController に戻ります。しかし、その後、appDelegate からのすべてのタブバー設定がなくなりました...
...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];
アップデート
...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];
誰かが私を助けてくれるかもしれません。私の最初の質問がそれほど悪くないことを願っています.