TabBarController有时只显示一个TabBarItem

时间:2013-12-27 17:09:28

标签: ios objective-c xcode cocoa-touch

我的TabBar有时工作正常,但有时它只显示第一个标签,我使用Storyboard创建它并使用此代码调用它:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {

            vc = [[UIStoryboard storyboardWithName:@"Main_iPad" bundle:nil] instantiateViewControllerWithIdentifier:@"TabBarSemLogin"];
        } else {

            vc = [[UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"TabBarSemLogin"];
        }

 [vc setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];

 [self presentViewController:vc animated:YES completion:nil];

0 个答案:

没有答案