Can anyone confirm that to support both iOS 6 and iOS 5 there is no point to adding the new iOS 6 autorotation methods, since the Apple docs suggest that these methods are c
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationMaskAll;
}
-(void)viewWillLayoutSubviews
{
if([self interfaceOrientation] == UIInterfaceOrientationPortrait||[self interfaceOrientation] ==UIInterfaceOrientationPortraitUpsideDown)
{
if (screenBounds.size.height == 568)
{
//set the frames for 4"(IOS6) screen here
}
else
{
////set the frames for 3.5"(IOS5/IOS6) screen here
}
}
else if ([self interfaceOrientation] == UIInterfaceOrientationLandscapeLeft||[self interfaceOrientation] == UIInterfaceOrientationLandscapeRight)
{
if (screenBounds.size.height == 568)
{
//set the frames for 4"(IOS6) screen here
}
else
{
////set the frames for 3.5"(IOS5/IOS6) screen here
}
}
//it is for IOS5
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
-(void)viewWillLayoutSubviews this method will call for ios5/ios6. this code is usefull to both ios6/ios5/ios6 with 3.5" screen/4" screen with ios6.