IOS6.0以后旋转的问题的处理

6.0以前用下面的这种方式
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return (toInterfaceOrientation != UIInterfaceOrientationMaskPortraitUpsideDown);
}
6.0以后要追加一下方式
- (BOOL)shouldAutorotate
{
    return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAllButUpsideDown;
}
 
UIInterfaceOrientationMaskLandscape  支持左右横屏
UIInterfaceOrientationMaskAll  支持四个方向旋转
UIInterfaceOrientationMaskAllButUpsideDown 支持除了UpsideDown以外的旋转
UIInterfaceOrientationPortrait 竖屏正常显示
原文地址:https://www.cnblogs.com/lzxpythonhome/p/2971371.html