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
Asked
Active
Viewed 212 times
1 Answers
0
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];
}

Ivan Lesko
- 1,274
- 13
- 26
-
How do I implement the "gamecenterViewControllerDidFinish"? – John paul Mar 08 '14 at 21:36
-
Implement the method in your view controller's implementation file.https://developer.apple.com/library/ios/documentation/GameKit/Reference/GKGameCenterViewControllerDelegate_Ref/Reference/Reference.html#//apple_ref/occ/intfm/GKGameCenterControllerDelegate/gameCenterViewControllerDidFinish: – Ivan Lesko Mar 08 '14 at 21:42
-
I would recommend following Apple's Game Center tutorials. https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/GameCenterOverview/GameCenterOverview.html – Ivan Lesko Mar 08 '14 at 22:49
-
How do I implement the LocalPlayer? – John paul Mar 09 '14 at 02:15
-
Apple's leaderboard tutorial walks you through all the steps you need to setup gamecenter in your app. https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/LeaderBoards/LeaderBoards.html It uses the GameCenterManager class https://github.com/nihalahmed/GameCenterManager – Ivan Lesko Mar 09 '14 at 04:43