2011-12-14 90 views

回答

1

是的。

你也想知道如何?在新创建的Cocos2D项目中打开GameConfig.h,并确保启用了自动旋转并将其设置为使用UIViewController。然后编辑RootViewController以返回设备支持的界面方向。

另一方面,我不厌倦这样说,你可以使用Kobold2D。在那里,你可以在config.lua文件中编辑这些设置:

DeviceOrientation = DeviceOrientation.Portrait, 
AutorotationType = Autorotation.UIViewController, 
ShouldAutorotateToLandscapeOrientations = NO, 
ShouldAutorotateToPortraitOrientations = YES, 

这将默认的方向为纵向,让自转使用的UIViewController并限制旋转两个人像方向。而已。