cocos2d-x如何切换横竖屏

cocos2d-x如何切换横竖屏,第1张

概述IOS: 找到项目IOS/RootViewController.mm 修改 - (NSUInteger) supportedInterfaceOrientations{#ifdef __IPHONE_6_0 //横版 //return UIInterfaceOrientationMaskAllButUpsideDown; //竖版 return UIInterfa

IOS:

找到项目IOS/RootVIEwController.mm

修改

- (NSUInteger) supportedInterfaceOrIEntations{#ifdef __IPHONE_6_0    //横版    //return UIInterfaceOrIEntationMaskAllButUpsIDeDown;    //竖版    return UIInterfaceOrIEntationMaskPortrait;#endif}
我将原来的横版改成了竖版
 

另外我们需要改一下项目,点击你的项目,选择General选项。修改Device OrIEntation

其中 portrait //竖版

landscape //横版,横版需要left和right都勾选

搞定IOS版本


androID:

androID比较简单,直接修改项目proj.androID/AndroIDManifest.xml

androID:screenorIEntation="portrait" //竖版

androID:screenorIEntation = "landscape" //横版

总结

以上是内存溢出为你收集整理的cocos2d-x如何切换横竖屏全部内容,希望文章能够帮你解决cocos2d-x如何切换横竖屏所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1070316.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存