Ios 如何在cocos2d-x 2.2.3中显示纵向模式

Ios 如何在cocos2d-x 2.2.3中显示纵向模式,ios,xcode,cocos2d-x,Ios,Xcode,Cocos2d X,我正在使用cocos2d-X2.2.3在xcode中开发一个游戏。我想把模式从横向改为纵向。我在rootviewcontroller.mm文件中使用了以下代码。但它仍然不起作用。任何人都可以帮助我。谢谢 return UIInterfaceOrientationIsPortrait( interfaceOrientation ); 在Rootviewcontroller.mm类中,按如下所示更改代码 - (void)didFinishBannerViewActionNotification:(

我正在使用cocos2d-X2.2.3在xcode中开发一个游戏。我想把模式从横向改为纵向。我在rootviewcontroller.mm文件中使用了以下代码。但它仍然不起作用。任何人都可以帮助我。谢谢

return UIInterfaceOrientationIsPortrait( interfaceOrientation );

在Rootviewcontroller.mm类中,按如下所示更改代码

- (void)didFinishBannerViewActionNotification:(NSNotification *)notification
{
NSLog(@"didFinishBannerViewActionNotification");
}
- (BOOL)shouldAutorotateToInterfaceOrientation:   (UIInterfaceOrientation)interfaceOrientation {
return UIInterfaceOrientationIsPortrait( interfaceOrientation );
}

- (NSUInteger) supportedInterfaceOrientations{
#ifdef __IPHONE_6_0
return UIInterfaceOrientationMaskPortrait;
#endif
} 
在xcode中单击您的项目名称,然后在常规类别中将设备方向更改为纵向。我希望它能起作用