Reputation: 5616
Just a quick question. Say I have updated my app to iOS6 and changed the shouldAutoRotate methods of iOS5 as follows :
- (BOOL) shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight;
}
If I am still supporting iOS5, do I need to check for the iOS version and then also include the old iOS5 methods (i.e shouldAutoRotateToInterfaceOrientation) if the app is being run on a device running iOS5 ?
Thanks !
Upvotes: 3
Views: 1727
Reputation: 82209
It's ok to have both iOS5 and iOS6 code in your app.
On iOS5, supportedInterfaceOrientations and shouldAutorotate will not be called, and on iOS6 the old methods shouldRotateToInterfaceOrientation etc will not be called.
Upvotes: 5