我的窗口的rootViewController是一个UINavigationController然后..在这个导航控制器的rootViewController中,我弹出一个模态视图(一个UITabBarController)
这样的事情:
UIWindow
->UINavigationController
-->MyFirstViewController<--In this class I run following code
Run Code Online (Sandbox Code Playgroud)
[self.navigationController presentModalViewController:tabController animated:YES];
Run Code Online (Sandbox Code Playgroud)
然后是调试器警告:当旋转多个视图控制器或视图控制器而不是窗口委托时,不支持使用两阶段旋转动画
但是,如果模态视图不是tabController,则不会出现此警告.
当我在导航控制器中弹出tabController模态视图时,这种行为会对应用程序造成什么伤害?
或者我应该找到另一种方法来做到这一点?
我在这个网站上发现了几个类似的问题,但我不明白......
我正在尝试使用以下代码以模态方式呈现UITabBarController:
// Declare all view controllers.
TabOne *tabOne = [[TabOne alloc] initWithNibName:@"TabOne" bundle:nil];
TabTwo *tabTwo = [[TabTwo alloc] init];
TabThree *tabThree = [[TabThree alloc] init];
// Set each view controller's delegate to self.
tabOne.delegate = self;
tabTwo.delegate = self;
tabThree.delegate = self;
// Set a title for each view controller.
tabOne.title = @"One";
tabTwo.title = @"Two";
tabThree.title = @"Three";
// Create a tab bar controller.
UITabBarController *tabBarController = [[UITabBarController alloc] init];
[tabBarController setViewControllers:[NSArray arrayWithObjects:tabOne,tabTwo,tabThree, nil]];
// Present the tab bar …Run Code Online (Sandbox Code Playgroud)