Question

I am trying to use the button to pull up a single view Gamecenter leaderboard and cant really figure out how. I tried apples forums but didnt help so I came here. Help is appreciated

Was it helpful?

Solution

The view controller that will present the GKGameCenterViewController must conform to the <GKGameCenterControllerDelegate> protocol.

To present the leaderboard:

GKGameCenterViewController *leaderboardController = [[GKGameCenterViewController alloc] init];
    if (leaderboardController != NULL) {
        leaderboardController.gameCenterDelegate = self;
        [self presentViewController:leaderboardController animated:YES completion:nil];
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top