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

后端 未结 8 1329
臣服心动
臣服心动 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

    Works for me!

    Open info.plist as source code, you will see these properties:

    • UISupportedInterfaceOrientations : For iPhone
    • UISupportedInterfaceOrientations~ipad : For iPad

    Under UISupportedInterfaceOrientations~ipad remove your unwanted orientation mode. In my case, I want only Portrait Mode so I removed the rest modes and then save it.

    Done! Good Luck

提交回复
热议问题