Allowing different orientations by device (iPad vs iPhone)

I’ve been watching the Developing iOS 11 Apps with Swift podcast (yes, iTunes U content is now available as podcasts, which is cool because you can view them on your Mac) and playing around the Concentration app. This app really wants to be Portrait on an iPhone but Portrait or Landscape on an iPad, given the whole master/detail thing.

I searched for ways to do this and while apparently you can do this in code, this method is super simple. You can add another Custom iOS Target Property to your Info.plist under the Info tab of your project’s target, specifically for iPad. The main one is:

Supported interface orientations

The iPad specific one is:

Supported interface orientations (iPad)

Here’s a screen shot to show it in action.

Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.