Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 box2d 进行 ios 应用程序开发。我想将设备方向固定为横向左侧,这是 cocos2d 中的默认设置。
我将如何锁定屏幕方向以使其在用户播放时无法更改?
这是您的问题的答案:
系统忽略 iPhone 旋转
您告诉操作系统忽略系统旋转。
在 Cocos2D 中打开 GameConfig.h 并根据其文档更改 Autorotation 宏以禁用自动旋转支持。