GKGameCenterViewController不会解雇?

时间:2014-01-21 03:01:31

标签: ios iphone game-center sprite-kit

我不明白请帮助我在完成任务后不要记录日志

 - (IBAction)loadScores:(id)sender {
GKGameCenterViewController* gameCenterController = [[GKGameCenterViewController alloc] init];
gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards;
// gameCenterController.gameCenterDelegate = self;
[self presentViewController:gameCenterController animated:YES completion:nil];
}

 -(void)gameCenterViewControllerDidFinish:(GKGameCenterViewController*)gameCenterViewController {
NSLog(@"rfffff");
[self dismissViewControllerAnimated:YES completion:nil];
UIViewController *vc = self.view.window.rootViewController;
[vc dismissViewControllerAnimated:YES completion:nil];
}

1 个答案:

答案 0 :(得分:1)

您已对GKGameCenterViewController的代表进行了评论。这意味着不会调用所有委托方法,就像解除视图控制器一样。所以我建议你取消注释这一行,然后运行代码并查看。