我正在实现一个自定义 matchmaker 视图控制器,并使用 GKMatchmaker 以编程方式使用以下方法为两个玩家找到匹配项:
[[GKMatchmaker sharedMatchmaker] findMatchForRequest:request withCompletionHandler:^(GKMatch *thisMatch, NSError *error)
我的自定义 matchmaker 视图控制器有一个按钮,允许玩家通过 [[GKMatchmaker sharedMatchmaker] cancel] 取消比赛。
当玩家 1 取消比赛时,有时 GKMatch 已经与玩家 2 创建。我如何通知玩家 2 玩家 1 已取消比赛并开始搜索另一场比赛?
我想答案可能在于 GKMatchmakerViewController 类和调用委托方法 matchmakerViewControllerWasCancelled 之前的代码。有谁知道我怎么能得到这个?