cocos2d-x如何切换横竖屏
发布时间:2020-12-14 16:31:27 所属栏目:百科 来源:网络整理
导读:IOS: 找到项目IOS/RootViewController.mm 修改 - (NSUInteger) supportedInterfaceOrientations{#ifdef __IPHONE_6_0 //横版 //return UIInterfaceOrientationMaskAllButUpsideDown; //竖版 return UIInterfaceOrientationMaskPortrait;#endif} 我将原来的
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" //横版 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |