Split view in portrait mode!

前端 未结 6 1579
梦毁少年i
梦毁少年i 2021-01-11 10:57

Apple provide the split view only for landscape but not for the portrait mode. Is there any way to achieve the splitview in portrait mode also?

[splitViewCo         


        
6条回答
  •  梦谈多话
    2021-01-11 11:20

    My little contribution here.

    Byte's answer is correct up until iOS 7. Starting in iOS 8 you should use preferredDisplayMode

    For example, to show both view controllers in portrait mode do the following:

    self.splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible;
    

    Hope this helps!

提交回复
热议问题