Diuoo
Diuoo

Reputation: 67

How to force a Swift iOS app only in portrait mode

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

Answers (2)

Giovanni Gaffé
Giovanni Gaffé

Reputation: 56

yes you can do the following

  1. Click on the icon of your app: app

  2. You should get this: this

Then you set only portrait mode

Upvotes: 2

Minh Văn
Minh Văn

Reputation: 61

Just go to you app setting -> Deployment Info -> Device Orientation, and tick on "Portrait" only

Upvotes: 2

Related Questions