I am working with the iPad at the moment and am using Cocos2D. Up until now I have just been testing with the default view when dealing with Game Center. I am attempting to now set it up as I want it, which is using either full screen or PageSheet (which is shown in the image).
My question(s) is fairly simple (at least in the asking). Why exactly is it doing that? I can not figure out how to access that “wooden” frame that is drawing over top of achievement view.

Here is the code I have been using (including random stuff I have been trying) to get to a bigger view.
- (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];
}
}
My understanding of UIKit is extremely limited. I use Cocos2D and Box2D and pretty much nothing else (up until now anyway). Please, any help you can provide will be very much appreciated. If you could simply show me how this would be done properly (without all the junk code I have in there) that would be perfect.
Thank you 🙂
I just tried to do this with UIModalPresentationPageSheet and I see the same result, it’s not just you. The “correct” way to do this is not to change the size of the modal view! 🙂 Apple’s UI designers have chosen their desired presentation style & size of the achievements view; it’s best not to mess with that, for consistency between games.