Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 横向游戏中心方向锁定_Iphone_Objective C_Game Center - Fatal编程技术网

Iphone 横向游戏中心方向锁定

Iphone 横向游戏中心方向锁定,iphone,objective-c,game-center,Iphone,Objective C,Game Center,加载GameCenter时,它处于默认的纵向视图中 有没有办法像水果忍者那样在景观视图中加载和锁定它 谢谢 我将它与cocos2d一起使用。您是否使用自动旋转?我认为默认的是UIViewRotation,这对我来说根本不起作用(你是如何让它在肖像中成功工作的?)。如果您更改为CCDirector轮换,它应该可以工作。您可以在GameConfig.h中修改此方法 [self presentModalViewController: leaderboardController animated: YE

加载GameCenter时,它处于默认的纵向视图中

有没有办法像水果忍者那样在景观视图中加载和锁定它

谢谢


我将它与cocos2d一起使用。

您是否使用自动旋转?我认为默认的是UIViewRotation,这对我来说根本不起作用(你是如何让它在肖像中成功工作的?)。如果您更改为CCDirector轮换,它应该可以工作。您可以在GameConfig.h中修改此方法

[self presentModalViewController: leaderboardController animated: YES];
将帮助你。
希望对你有帮助。

是的。。这是自动旋转。。。GameConfig.h?我找不到。。它是在gamekit框架中吗?类似的作品。。但当玩家在纵向模式下按住它并按下gamecenter时,gamecenter会再次以纵向模式出现=(已解决!!!升级到0.99.5,我的代码是:GKMatchmakerViewController*mmvc=[[GKMatchmakerViewController alloc]initWithMatchRequest:request];[[CCDirector sharedDirector]openGLView]addSubview:[U tmpView.view];[[U tmpView presentModalViewController:mmvc动画:否];//添加此CGMMVC.view.transform=AffineTransformMakeRotation](CC_度到_弧度(90.0f));mmvc.view.bounds=CGRectMake(0,0480320);