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

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

    Its work perfectly. Dont need to write code for it.

    First select project and then go in first tab "General".

    Now select "Devices" option in Deployment info section is iPad and in that down select Device orientation .. In which remove checkmark from landscape Left, Right option

    After done select it back device as universal and set device orientation as portrait..mode and remove check mark from landscape mode.

    Now run your app in iPad and check that things. I hope it will be resolved.

提交回复
热议问题