iOS展示了特定的排行榜Game Center

时间:2015-12-17 17:14:09

标签: ios leaderboard game-center-leaderboard

如何在Game Center中显示特定的排行榜?

我的代码是:

    GKGameCenterViewController *gameCenterController = [[GKGameCenterViewController alloc] init];

    if (gameCenterController != nil)
    {
        gameCenterController.leaderboardIdentifier = @"leaderboard1";
        gameCenterController.gameCenterDelegate = self;
        gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards;

        [self presentViewController: gameCenterController animated: YES completion:nil];
    }

我只想显示" leaderboard1"但它显示所有排行榜。排行榜标识符名称正确。

由于

0 个答案:

没有答案