Reputation: 67
I am writing an iOS app in Swift and I would like to prevent the user from using the app in landscape mode. Is there a way to easily block any view to portrait mode only?
Upvotes: 4
Views: 2390
Reputation: 56
yes you can do the following
Click on the icon of your app:
You should get this:
Then you set only portrait mode
Upvotes: 2
Reputation: 61
Just go to you app setting -> Deployment Info -> Device Orientation, and tick on "Portrait" only
Upvotes: 2