0

I want the device supports only landscape orientation. On iPhones all work fine. But iPad supports portrait too. How to fix it?

image

kb920
  • 3,039
  • 2
  • 33
  • 44
user
  • 21
  • 1
  • 3

2 Answers2

2

Select the iPad from Devices and check Landscape Left & Landscape Right only like this image.

enter image description here

Nirav D
  • 71,513
  • 12
  • 161
  • 183
0

As i understand , you can try with this code into any of view controller.

-(BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation {

    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft | interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
Samkit Shah
  • 721
  • 1
  • 7
  • 18
  • It's been removed since iOS 6.1. Instead modern apps should use `supportedInterfaceOrientations` and such. – pronebird Aug 31 '16 at 10:47