I have developed an iOS App and tested it on iOS6 device. While testing, I realized that my App is not responding to Orientation changes as expected.
Here is my Code:
// Autorotation (iOS >= 6.0)
- (BOOL) shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationMaskPortrait;
}
Precisely, I want to know that what Methods are called on Orientation Changes in iOS.
shouldAutoRotate
method is introduced instead ofshouldAutorotateToInterfaceOrientation
. And can be used in iOS5 and iOS 6 – Cimbura