cocos2d-iPhone:制作iPhone应用程序支持肖像和肖像使用下拉
问题描述:
我想使iPhone应用程序支持使用cocos2d-iPhone 1.0肖像&肖像使用下降。 cocos2d-iPhone可以自动旋转吗?cocos2d-iPhone:制作iPhone应用程序支持肖像和肖像使用下拉
答
是的。
你也想知道如何?在新创建的Cocos2D项目中打开GameConfig.h,并确保启用了自动旋转并将其设置为使用UIViewController。然后编辑RootViewController以返回设备支持的界面方向。
另一方面,我不厌倦这样说,你可以使用Kobold2D。在那里,你可以在config.lua文件中编辑这些设置:
DeviceOrientation = DeviceOrientation.Portrait,
AutorotationType = Autorotation.UIViewController,
ShouldAutorotateToLandscapeOrientations = NO,
ShouldAutorotateToPortraitOrientations = YES,
这将默认的方向为纵向,让自转使用的UIViewController并限制旋转两个人像方向。而已。