سؤال

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

هل كانت مفيدة؟

المحلول

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];
    }
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top