Reputation: 455
How can I force my application to launch an UISplitViewController in landscape mode?
Upvotes: 0
Views: 1043
Reputation: 36670
This is a pretty old question, and Apple has since updated XCode to handle this specific situation. These steps were tested in XCode 8.2.1.
In the plist editor, expand out the supported interfaces for both form factors (Phone/Touch is the first one):
Then, simply delete the ones you do not wish to support based on device type.
Upvotes: 0
Reputation: 3278
you can have different device-based settings in your Info.plist file.
I found an example where it talked about having the app launching in Landscape mode (depending on device) like this:
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationPortrait</string>
<key>UIInterfaceOrientation~ipad</key>
<string>UIInterfaceOrientationLandscapeLeft</string>
With the first tag refering to iPhone and the ~iPad one refering to iPad. Not sure if this link will help you, but this (I mean the Info.plist way) is definitely the way to go.
Hope it helps.
Ciao
Giovanni
Upvotes: 0
Reputation: 94
You can always use this method.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
Upvotes: 0