GKGameCenterViewController

GKGameCenterViewController

我不明白,请帮助我点击完成后不要得到日志

 - (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];
}

最佳答案

您已评论GKGameCenterViewController的代表。这意味着将不会像关闭视图控制器那样调用所有委托方法。因此,我建议您取消注释此行,然后运行代码并查看。

关于ios - GKGameCenterViewController不会解雇吗?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21248323/

10-13 08:45