0
- (void) reportScore: (int64_t) score forLeaderboardID: (NSString*) identifier
{
GKScore *scoreReporter = [[GKScore alloc] initWithLeaderboardIdentifier: identifier];
scoreReporter.value = score;
scoreReporter.context = 0;
NSArray *scores = @[scoreReporter];
[GKLeaderboard reportScores:scores withCompletionHandler:^(NSError *error) {
//Do something interesting here.
}];
}
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/LeaderBoards/LeaderBoards.html的iOS 7 - 游戏中心排行榜集成
在上述网站,我用上面的代码(和标题被上报比分游戏中心(的iOS 7)),但在GKLeaderboard reportScores。 ..线,我得到一个错误,说没有这样的方法。我如何解决这个问题,而不使用GKScore弃用的reportScoreWithCompletionHandlerMethod?