如何设置默认屏幕方向?

时间:2013-04-08 02:37:04

标签: cocos2d-iphone screen-orientation

以某种方式与Cocos2d - Setting Device/Screen Orientation相关但我希望找到一种方法来保留默认的“允许方向”设置,但修改初始方向设置。

现在:

  • 初步定位:左侧风景
  • 允许的方向:任何风景

所需:

  • 初步定位:风景正确
  • 允许的方向:任何风景

1 个答案:

答案 0 :(得分:0)

在这篇旧帖子中回答:http://www.cocos2d-iphone.org/forum/topic/32650

  

如果您同时支持横向,但希望拥有   UIInterfaceOrientationLandscapeLeft是最初的,然后更改   上面的代码返回   UIInterfaceOrientationIsLandscape(interfaceOrientation)和你的   info.plist文件,设置UIInterfaceOrientation(初始界面   orientation)UIInterfaceOrientationLandscapeLeft的关键。

它对我不起作用。相反,我将UISupportedInterfaceOrientations中的方向顺序从“左,右”更改为“右,左”,现在我的游戏以横向开始,但允许向左旋转。

相关问题