我目前正在尝试将视图从 UIViewController 切换到 SplitViewController。我目前正在我的 UIViewController 中执行此操作:
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[UIView transitionWithView:delegate.window duration:0.5 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{
delegate.window.rootViewController = delegate.splitViewController;
} completion:nil];
[self.view removeFromSuperview];
这是切换视图的正确方法吗?如果是,我仍然有一个问题需要用这种方法解决。它首先在纵向模式下快速显示 MasterView,然后在 iPad 的当前方向模式下显示整个拆分视图。
我希望我足够清楚。
谢谢你的帮助。