11

I need to set Portrait mode when my application is running in a iPhone and in Landscape mode when running in iPad. I have change in info.plist but i can't set it for iPad or iPhone.

Buntylm
  • 7,345
  • 1
  • 31
  • 51
Nabil El
  • 972
  • 1
  • 10
  • 24

3 Answers3

15

In your project target, go to General, then in the Development Info section follow the attached images:

1-Make sure that your app is set to Universal for the supported devices

2-Chose iPhone and check Portrait.

3-Chose iPad and check Landscape.

iPhone Portrait iPad Landscape

Mutawe
  • 6,464
  • 3
  • 47
  • 90
  • now its don't have this options in xcode 9.2 please tell what to do for this situation.? – Hari Narayanan Dec 10 '17 at 05:57
  • Although 9.2 don't have this option. you can still firstly select ipad in "devices" and select orientation, and then select "iphone" and select orientation. Afterwards, you select back to "universal" in devices. The orientation of iphone and ipad will follow what you have selected before. – Richter Dec 05 '19 at 01:52
8

In Xcode 9.2 have no option for selecting the orientation for ipad and iphone

enter image description here

but we can able to change it in by info.plist whatever orientation we should need.. its much easy too.

enter image description here

Reference : iPhone portrait-only app starts as landscape on iPad

Hari Narayanan
  • 754
  • 1
  • 12
  • 36
-2

Check here for iPad:

http://developer.appcelerator.com/question/134746/use-only-portrait-mode-on-ipad

and here for iPhone: how to support landscape/Portrait orientation only for one UIView

Just a quick google..

Community
  • 1
  • 1
miniHessel
  • 778
  • 4
  • 15
  • 39