Daniele B
Daniele B

Reputation: 20412

Swift: how to lock app in landscape mode just for iPad/iPadMini?

My app is using a UISplitViewController, which provides a dual-pane in landscape mode for iPad/iPadMini.

I would like to always lock the app to landscape mode in case the device is an iPad or iPadMini.

How can I do that in Swift?

Upvotes: 0

Views: 268

Answers (1)

Knight0fDragon
Knight0fDragon

Reputation: 16827

In your Info.plist file, look for Supported interface orientations (iPad), and remove any orientations that you do not want to support, that should force landscape only orientation, there may have to be other things you need to do in your code on top of this, but that is code dependent.

Upvotes: 1

Related Questions