Miscellaneous Initial orientation of the interface Universal application for iPhone and iPad

What I want is portrait orientation for iPhone and landscape orientation for iPad. My app is for>
I searched the Internet about this, but received different answers, but not exact.

0
source share
2 answers

So here is what I did

For iPhone enter image description here

and for iPad enter image description here

And for the iPad controllers, I added the code below, this is not necessary for the ios6 application

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft); } 
0
source

You should do this by simply adding this code to your application delegate.

Quick code:

 func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) -> Int { if UIDevice.currentDevice().userInterfaceIdiom == .Phone { return Int(UIInterfaceOrientationMask.Portrait.rawValue) } else { return Int(UIInterfaceOrientationMask.LandscapeLeft.rawValue | UIInterfaceOrientationMask.LandscapeRight.rawValue) } } 
0
source

All Articles