我的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];