【问题标题】:How to set default screen orientation?如何设置默认屏幕方向?
【发布时间】:2013-04-11 11:04:39
【问题描述】:

不知何故与Cocos2d - Setting Device/Screen Orientation 相关,但我想找到一种方法保留默认的“允许方向”设置,但修改初始方向设置。

现在:

  • 初始方向:横向左侧
  • 允许的方向:任何横向

期望:

  • 初始方向:向右横向
  • 允许的方向:任何横向

【问题讨论】:

    标签: cocos2d-iphone screen-orientation


    【解决方案1】:

    在这个旧帖子答案中建议:http://www.cocos2d-iphone.org/forum/topic/32650

    如果您支持两种横向但又想拥有 UIInterfaceOrientationLandscapeLeft 为初始,然后更改 上面的代码返回 UIInterfaceOrientationIsLandscape(interfaceOrientation) 并在您的 info.plist文件,设置UIInterfaceOrientation(初始界面 方向) 键到 UIInterfaceOrientationLandscapeLeft。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-13
      • 2021-03-04
      • 1970-01-01
      • 2017-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多