私は現時点でiPadで作業しており、Cocos2Dを使用しています。今まで私はGame Centerを扱うときにデフォルトビューでテストしています。私は現在、フルスクリーンまたはPageSheet(画像に表示されている)のいずれかを使用して、私が望むように設定しようとしています。GKAchievementViewControllerフルスクリーン(またはPageSheet)の奇数表示
私の質問はかなりシンプルです(少なくとも質問してみると)。なぜそれは正確にそれをしていますか?私は成果の視点の上に描かれているその "木の"フレームにアクセスする方法を理解できません。ここで
私は大きなビューを取得するために(私がしようとしているのランダムなものを含む)を使用しているコードです。
- (void)showAchievements:(id)sender
{
GKAchievementViewController *achievements = [[GKAchievementViewController alloc] init];
if (achievements != nil)
{
achievements.achievementDelegate = self;
tempVC = [[UIViewController alloc] init];
// tempVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
// tempVC.interfaceOrientation = [[UIDevice currentDevice] orientation];
[achievements shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeLeft];
[achievements shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
[tempVC shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeLeft];
[tempVC shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
// achievements.navigationController.modalPresentationStyle = UIModalPresentationPageSheet;
// tempVC.wantsFullScreenLayout = YES;
tempVC.modalPresentationStyle = UIModalPresentationPageSheet;
tempVC.view.superview.bounds = CGRectMake(0, 0, winSize.width, winSize.height);
// tempVC.view.superview
// tempVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
// achievements.wantsFullScreenLayout = YES;
achievements.modalPresentationStyle = UIModalPresentationPageSheet;
// achievements.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
achievements.navigationController.modalPresentationStyle = UIModalPresentationPageSheet;
// achievements. = CGRectMake(0, 0, winSize.width, winSize.height);
[[[CCDirector sharedDirector] openGLView] addSubview:tempVC.view];
[tempVC presentModalViewController:achievements animated:YES];
}
}
私のUIKitの理解は非常に限られています。私はCocos2DとBox2Dを使用しています。あなたが提供できるヘルプは非常に高く評価されます。もし、これが(私がそこに持っているすべてのジャンクコードなしで)これがどのように適切に行われるのかを単に私に見せてくれれば、それは完璧だろう。
ありがとうございました:)
を私はこれを尋ね、次いで約一週間かそこらのために非常に病気になったと私は戻ってないコメントとしてそんなに来ます。うまくいけば賞金は私に答えを得るでしょう:) –