Cocos2d,如何将设备方向设置为纵向 IOS

Cocos2d, How Set Device Orientation to portrait IOS

我关注了这个http://www.cocos2d-x.org/wiki/Device_Orientation

但我的 RootViewController.mm 不完全像那样。

我更换后 'UIInterfaceOrientationMaskAllButUpsideDown' 'UIInterfaceOrientationMaskPortrait' main.m

有一些错误

我的 cocos2d 版本 = cocos2d-x-3.13.1 ,在 iPhone 7 模拟器上

您还需要转到 xcode 项目设置并选择设备方向。 这是截图。