2016-07-28 72 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模擬器中證實了這一點。