我正在制作一个 iPhone 应用程序,但出现“预期标识符”错误。在错误日志中,上面有一个粗体的“解析问题”。它在这段代码中:
-(void) showLeaderboard:{
GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
if (leaderboardController != nil)
{
leaderboardController.leaderboardDelegate = self;
[self presentModalViewController: leaderboardController animated: YES]; }}
-(void) leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController
{
[self dismissModalViewControllerAnimated:YES];
}
实际的错误就在这行:"-(void) showLeaderboard:{" 并且小指针在小括号上。请帮忙。谢谢。