Presenting game center leaderboard

Posted by Coder404 on Game Development See other posts from Game Development or by Coder404
Published on 2012-12-10T01:29:34Z Indexed on 2012/12/10 5:19 UTC
Read the original article Hit count: 238

Filed under:
|
|

I have the following code:

-(void)showLeaderboard {

GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
if (leaderboardController != NULL)
{
    leaderboardController.timeScope = GKLeaderboardTimeScopeAllTime;
    leaderboardController.leaderboardDelegate = self;
    [self presentModalViewController: leaderboardController animated: YES];
}

[leaderboardController release];

}

Which I am trying to use to make my leader-board pop up. The issue is cocos2d will not allow me to use the line:

        [self presentModalViewController: leaderboardController animated: YES];

How do I fix this?

Thanks

PS I am using cocos2d

© Game Development or respective owner

Related posts about cocos2d-iphone

Related posts about cocos2d