- (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.
}];
}Guide/LeaderBoards/LeaderBoards.html
在上面的网站上,我使用了上面的代码(标题是向游戏中心(iOS 7)报告一个分数),但是在GKLeaderboard reportScores上.行,我收到一个错误,说没有这样的方法。如何在不使用GKScore的不推荐的reportScoreWithCompletionHandlerMethod的情况下修复这个问题?
发布于 2013-11-04 07:43:36
所以苹果的东西有个错误。GKLeaderboard应该是reportScores线上的GKScore。
https://stackoverflow.com/questions/19763324
复制相似问题