系统升级到ios6之后,发现程序根本不进shouldAutorotateToInterfaceOrientation:方法,想让视图的第一个页面不旋转,在推出来的页面响应旋转,这怎么实现呢。求高手赐教

解决方案 »

  1.   

    要在 Taget 的属性中设置支持的屏幕方向,才会调用相关的屏幕旋转方法。参考苹果的文档。
      

  2.   

    这个我知道  可是我不想让他在主页面中旋转 ,在推出来的页面里可以旋转 
    如果在target里设置了 不让他旋转 他在任何页面也都不会旋转了 
      

  3.   

    shouldAutorotateToInterfaceOrientation,这个方法被抛弃了,在6中用两个方法替代,你查下文档。
      

  4.   

    1. 在target设置支持的orientation
    2.用下面的方法控制其所在的 view controller 是否支持orientation.-(BOOL)shouldAutorotate{
        return YES;
    }
      

  5.   

    在AppDelegate中增加- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window  
        {  
             return UIInterfaceOrientationMaskPortrait;  
        }
      

  6.   

    In ios6 禁止横屏,
    - (BOOL)shouldAutorotate
    {
    return NO;
    }
    -(NSUInteger)supportedInterfaceOrientations
    {
      return UIInterfaceOrientationMaskPortrait;
    }建议你参考 blog.csdn.net/totogogo/article/details/8002173