In my rootViewController, I re-implemented the method shouldAutorotateToInterfaceOrientation
like this.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
switch (toInterfaceOrientation) {
case UIInterfaceOrientationPortrait:
NSLog(@"Orientation - Portrait");
break;
case UIInterfaceOrientationLandscapeLeft:
NSLog(@"Orientation - Left");
break;
case UIInterfaceOrientationLandscapeRight:
NSLog(@"Orientation - Right");
break;
case UIInterfaceOrientationPortraitUpsideDown:
NSLog(@"Orientation - UpsideDown");
break;
default:
break;
}
return YES;
}
When I rotate my device, this method is called for LandscapeRight, LandscapeLeft and UpsideDown, but not for the Portrait orientation.
At the launch the view is in portrait mode, and this method is called with UIInterfaceOrientationPortrait. But when I rotate the device this method is not called only for this orientation.