0

私は次の問題を抱えています: 私のタブバーのデザインは 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];

誰かが私を助けてくれるかもしれません。私の最初の質問がそれほど悪くないことを願っています.

4

1 に答える 1

0

戻るときは、新しい tabBar コントローラーをインスタンス化しています。これは、カスタム設定で構成したものと同じではないことを意味します。

代わりに、アラートまたは適切に表示されているものは何でも無視してください。

于 2013-08-04T14:09:47.023 に答える