iPhone 6 Plus上的UISplitViewController Rotation Master Master

时间:2014-09-15 16:39:22

标签: objective-c iphone storyboard ios8 uisplitviewcontroller

因此,如果你创建一个带有'MasterView'和'DetailView'设置的UISplitViewController

enter image description here

在iPhone 6 Plus的纵向“MasterView”中按下项目按钮按下/显示“MasterView2”然后旋转设备我希望看到这个 - “MasterView2”| '的DetailView'

enter image description here

但我获得'MasterView'| 'MasterView2'

enter image description here

这应该如何设置,以便在旋转iPhone 6 Plus时获得预期的'MasterView2'| '的DetailView'?

1 个答案:

答案 0 :(得分:2)

对于感兴趣的人来说,我是如何使用splitviewcontroller委托解决问题的

- (BOOL)splitViewController:(UISplitViewController *)splitViewController
collapseSecondaryViewController:(UIViewController *)secondaryViewController
ontoPrimaryViewController:(UIViewController *)primaryViewController{
   return YES;
}

- (UIViewController *)splitViewController:(UISplitViewController *)splitViewController
separateSecondaryViewControllerFromPrimaryViewController:(UIViewController     *)primaryViewController{
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    return [storyboard instantiateViewControllerWithIdentifier:@"detailView"];
}