Cocos2d iphone 我正在制作一个coocs2d游戏,并在其中实现游戏中心。我的游戏中心不是';不能使用景观模式

Cocos2d iphone 我正在制作一个coocs2d游戏,并在其中实现游戏中心。我的游戏中心不是';不能使用景观模式,cocos2d-iphone,game-center,uiinterfaceorientation,Cocos2d Iphone,Game Center,Uiinterfaceorientation,我想将我的游戏中心默认设置更改为横向模式,但没有成功。我尝试了一些课程,但没有结果 #import "GKMatchmakerViewController-LandscapeOnly.h" @implementation GKMatchmakerViewController (LandscapeOnly) - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

我想将我的游戏中心默认设置更改为横向模式,但没有成功。我尝试了一些课程,但没有结果

#import "GKMatchmakerViewController-LandscapeOnly.h"

@implementation GKMatchmakerViewController (LandscapeOnly)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
    return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );
}

@end
这个类也是为我的游戏实现的


如果你有什么解决办法,请让我帮你

嘿,这个东西在模拟器中不起作用,但对我来说,它对设备很好


解决了问题…

嘿,这个东西在模拟器中不起作用,但对我来说,它对设备很好


解决了问题……

@Yannick我认为在创建沙箱环境时有些东西。我真的不知道,但苹果应该在他们的框架或沙盒环境中给出这个选项。@Yannick我认为在创建沙盒环境时有一些东西。我实际上不知道,但苹果应该在他们的框架或沙盒环境中给出这个选项。