iOS6 横屏项目自动旋转的问题解决 cocos2d
更新了XCode 4.5以后,所有的项目都是基于iOS6 SDK来开发了。发现一个特别烦恼的问题就是横屏的自动旋转,所有的项目横屏自动旋转都坏掉了。
解决方法我再Google上找到了好多,但是很多不适合我的情况,操作半天也没反映,后来终于发现如下办法:
1.在 RootViewController.m总增加
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotate {
return YES;
}
2.在 AppDelegate.m 中增加
window.rootViewController = viewController;

浙公网安备 33010602011771号