1
votes

I have UISplitViewController in StoryBoard that is initial view and I want the app to work only in Landscape mode.

I have restricted orientation to landscape only, and even put in plist Initial interface orientation to Landscape (right home button).

In iOS 6 everything works fine, it shows master and detail view only, but in iOS 5 it is stuck in Portrait mode and only shows Detail view.

Please help me with this, I am stuck with it for last 2 hours...

1

1 Answers

6
votes

You need to implement shouldAutorotateToInterfaceOrientation in the view controllers you have contained in the UISplitViewController:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}