ios6.0旋转问题解决

 

 

  1. - (NSUInteger) supportedInterfaceOrientations{ 
  2. NSInteger flag = UIInterfaceOrientationMaskAll; 
  3. if([[self topViewController] isKindOfClass:NSClassFromString(@"SecondVC")]) 
  4. return UIInterfaceOrientationMaskLandscape; 
  5. return flag; 
  6. - (BOOL) shouldAutorotate { 
  7. return YES; 
近期公司项目要新增一个模块,其中有一个界面比较特殊只支持横屏
寻找再三参考这个文章 http://blog.csdn.net/totogogo/article/details/8002173
,然后测试这个方法还不错
特殊界面的类名字为SecondVC
横屏问题就得到解决了,这只是支持ios6.0的,6.0以下的版本参考上面的文章也能解决好
当然需要使用sdk6.0开发 xcode4.5也是需要的