1337code
1337code

Reputation: 385

iPad orientation issue in iOS 5

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...

Upvotes: 1

Views: 790

Answers (1)

Sherman Lo
Sherman Lo

Reputation: 2759

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

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

Upvotes: 6

Related Questions