2016-07-28 57 views

回答

1

有解决这个问题两个解决方案:

  1. 这是不理想的,从主面板呈现模式的观点,但你应该从UISplitViewController本身做这件事。

    splitViewController.preferredDisplayMode =UISplitViewControllerDisplayModeAllVisible; // For displaying the master panel always as is in the screen shot in the Question 
    modalViewController.modalPresentationStyle = UIModalPresentationFormSheet; // For displaying the modalViewController in form sheet style 
    [splitViewController presentViewController:modalViewController animated:TRUE completion:nil]; // Note: modalViewController is presented from UISplitViewController and not from master panel of split view 
    
  2. 洒视图的主面板被呈现在酥料饼时在纵向模式,以便该装置旋转的变化要经过popovercontroller。我猜测这一点上的连锁断裂。因此,要解决这个问题的呼叫

    [spliVC setPreferredDisplayMode:UISplitViewControllerDisplayModePrimaryHidden]; 
    

模态呈现SEGUE是(从prepareForSegue)调用之前。我不确定代表是否使用这种方法。

编辑: 我也观察到,如果拆分视图是UISplitViewControllerDisplayModeAllVisible模式,则甚至呈现从主屏模式VC(让在故事板的简单模式赛格瑞说)不给旋转的问题。我已经在iOS 9.3模拟器中证实了这一点。

相关问题