0

Can i fix my application to landscape permanently?

rptwsthi
  • 10,094
  • 10
  • 68
  • 109
  • possible duplicate of [Lock Ipad App in Landscape mode](http://stackoverflow.com/questions/11888612/lock-ipad-app-in-landscape-mode) – finnw Nov 17 '12 at 19:45

1 Answers1

4

In your application’s Info.plist file, add the UIInterfaceOrientation key and set its value to the landscape mode. For landscape orientations, you can set the value of this key to UIInterfaceOrientationLandscapeLeft or UIInterfaceOrientationLandscapeRight.

Override your view controller’s shouldAutorotateToInterfaceOrientation: method and return YES only for the desired landscape orientation and NO for portrait orientations.

Refer Landscape Mode ONLY for iPhone or iPad for more details

Community
  • 1
  • 1
visakh7
  • 26,380
  • 8
  • 55
  • 69
  • UIInterfaceOrientation was no option.. it was initial orientation.. but info.plist helped – rptwsthi Mar 24 '11 at 11:04
  • Note that for iPad if you are supporting only one orientation, you should support both variants of orientation. Else it will be rejected by app store – Mahesh Mar 24 '11 at 12:23