How do I disable landscape-orientation on an iPad app?

后端 未结 8 1331
臣服心动
臣服心动 2021-02-01 12:41

I created a completely new, single-view iOS universal Swift app. Then, I unchecked \"Landscape Left\" and \"Landscape Right\" in the app settings. I ran it on my iPhone, and hoo

8条回答
  •  迷失自我
    2021-02-01 13:21

    There are separate entries in Info.plist for iPhone and iPad supported orientations.

    • iPhone = UISupportedInterfaceOrientations
    • iPad = UISupportedInterfaceOrientations~ipad

    You need to modify Info.plist and remove landscape entries for UISupportedInterfaceOrientations~ipad key.

提交回复
热议问题