UiSplitViewController doesn't autorotate

前端 未结 6 2130
小蘑菇
小蘑菇 2020-12-15 13:02

I have recently run into a problem. My iPad app is somehow preventing the iPad from auto-rotating. My app loads a UISplitView with both of the view controllers returning Y

6条回答
  •  臣服心动
    2020-12-15 13:39

    Is your UISplitViewController set as your root view controller? If not, that may be the cause of your problem. I was having a similar issue - the status bar would rotate but my detail and master views would stay in place. I rearranged the views so that the UISplitViewController was the root and then my 'main menu' was presented as a modal view controller on top of the split view, and it made the rotation problem go away.

    According to the iPad Programming Guide, "The split view controller’s view should always be installed as the root view of your application window."

    Hope this helps.

提交回复
热议问题