THIS IS NOT A DUPLICATE QUESTION. A final working solution has NOT been provided yet. Please do not CLOSE this question until I have accepted an answer or found and provided my own solution for this. Thanks!
================================================================== Using Xcode 4.5.1, I have a tab-bar app with 5 tabs in it. Each tab contains a UINavigationController. The entire App thus needs to be viewed in Portrait mode with the exception of one sole ViewController - a "modal" VC that opens in full screen and that's intended to be viewed in Landscape mode.
This worked perfectly well in iOS5 - I simply used the following code in that one particular ViewController:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
But now the App crashes, and gives this error:
Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation',
reason: 'preferredInterfaceOrientationForPresentation must return a supported interface orientation!'
Any suggestions?