I am developing an iPhone only app. This application supports portrait and landscape orientations in the Supported Interface Orientations, but in the first view of the application I disable rotation with the following code:
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
Now, my problem is that when I start the app on an iPad with iOS 6.1 while holding the iPad in landscape mode, the app starts in portrait mode while the status bar is in landscape mode. Also, the application does not respond to any touches.
I have tried returning YES
in the call to shouldAutorotate
or setting the status bar in portrait mode with a call to [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait]
, BUT when I do this the application switches 3 times in orientation (landscape -> portrait upsidedown -> portrait) resulting in a lot of flickering at start-up, so this doesn't seem like the way to go, or is it?