使用cocos2d-x时在ios上设置竖屏ZZ

http://my.oschina.net/minglic/blog/151914


使用cocos2d-x创建一个ios项目后,在模拟器中运行时,认是竖屏的,如果需要设置成横屏,需要改掉三个地方:

1、修改RootViewController.mm文件中的两个地方:


?
1
2
3
4
5
6
7
8
9
10
-( BOOL )shouldAutorotatetoInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
//Forios6,usesupportedInterfaceOrientations&shouldAutorotateinstead
-(NSUInteger)supportedInterfaceOrientations{
#ifdef__IPHONE_6_0
UIInterfaceOrientationMaskPortrait;
#endif
}


另外还要改一个地方,在xcode5上:

相关文章

    本文实践自 RayWenderlich、Ali Hafizji 的文章《...
Cocos-code-ide使用入门学习地点:杭州滨江邮箱:appdevzw@1...
第一次開始用手游引擎挺激动!!!进入正题。下载资源1:从C...
    Cocos2d-x是一款强大的基于OpenGLES的跨平台游戏开发...
1.  来源 QuickV3sample项目中的2048样例游戏,以及最近《...
   Cocos2d-x3.x已经支持使用CMake来进行构建了,这里尝试...