只是一个简短的问题。假设我已经将应用程序更新为iOS6,并更改了iOS5的shouldAutoRotate方法,如下所示:
- (BOOL) shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight;
}如果我仍然支持iOS5,如果应用程序在运行iOS5的设备上运行,我是否需要检查iOS版本,然后还包括旧的iOS5方法(即shouldAutoRotateToInterfaceOrientation)?
谢谢!
发布于 2012-10-10 00:55:39
在您的应用程序中同时包含iOS5和iOS6代码是可以的。
在iOS5上,supportedInterfaceOrientations和shouldAutorotate不会被调用,在iOS6上,旧方法shouldRotateToInterfaceOrientation等也不会被调用。
https://stackoverflow.com/questions/12804695
复制相似问题