使用cocos2d-x时在ios上设置竖屏ZZ
来源:互联网 发布:原始股 知乎 编辑:程序博客网 时间:2024/06/13 22:49
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 );
}
// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
- (NSUInteger) supportedInterfaceOrientations{
#ifdef __IPHONE_6_0
return
UIInterfaceOrientationMaskPortrait;
#endif
}
另外还要改一个地方,在xcode5上:
0 0
- 使用cocos2d-x时在ios上设置竖屏ZZ
- 使用cocos2d-x时在ios上设置竖屏
- 使用cocos2d-x时在ios上设置竖屏
- 使用cocos2d-x时在ios上设置竖屏
- cocos2d 在ios上设置横竖屏
- cocos2d-x在ios上使用中文字体的方法
- Cocos2d-x 2.x设置竖屏方法 android ios
- IOS Cocos2d-x 设置竖屏的方法
- 使用COCOS2D-X JSB开发,在js页面中设置iOS键盘模式
- TinyXML在(IOS)cocos2d-x上的调…
- cocos2d-x在iOS/Android双平台上嵌入WebView
- cocos2d-x 2.14 在IOS 6.1 中竖屏设置
- cocos2d-x 2.14 在IOS 6.1 中竖屏设置
- cocos2d-x 2.x在android上使用C++11时的设定
- 使用Cocos2D-x引擎在Mac下开发运行在iOS设备上的《植物大战僵尸》第一篇
- cocos2d-x在Xcode(iOS )中设置横竖屏的解决方案
- <cocos2d-x for wp7>在cocos2d-x上使用重力加速器
- Cocos2d-x中在一个CClayer上设置按钮控制另一个CClayer上的对象
- HDU 1827
- 乐观锁和悲观锁 你更钟情于哪一个?
- 在CSS中设置浮动元素两端对齐的2种方法分享
- UVa 1451:Average(数形结合)
- LeetCode题解:Longest Substring Without Repeating Characters
- 使用cocos2d-x时在ios上设置竖屏ZZ
- SSH使用密钥登录并禁止口令登录实践
- eclipse配置jetty运行环境二
- socket介绍
- Thrift学习整理之环境搭建
- XtraBackup不停机不锁表搭建MySQL主从同步实践
- 51单片机几种精确延时(包含自动适应主时钟)
- NYOJ 289 苹果(01背包)
- GO语言介绍