How to make an ipad app only portrait?

2019-02-10 12:15发布

问题:

I am making an ipad app, and i set the the app to only portrait, but it still works in landscape? Why is this happening only on an ipad? How do i fix this?

Note: if the answer is in code, please write it in swift.

回答1:

In xcode select your project. Go to Targets -> General, scroll down and you can select the Orientation as portrait only.

You can also make change to info.plist file to select proper orientations for Supported interface orientations (iPad)



回答2:

In deployment Info section you can select your app orientation to support.