创建比赛后如何解除GKTurnBasedMatchmakerViewController
?可用的代理似乎仅适用于出现错误的情况。曾经有一个名为didFind
,但由于它被弃用,我很难弄清楚如何在创建比赛或玩家点击现有比赛时解雇它。
receivedTurnEventFor
是唯一的跟进电话,它没有引用匹配器视图控制器。
我正在GKTurnBasedMatchmakerViewController
通过
SKView
let viewController = self.view?.window?.rootViewController
let vc = GKTurnBasedMatchmakerViewController(matchRequest: r)
vc.turnBasedMatchmakerDelegate = self
viewController?.present(vc, animated: true, completion: {
print("launched GKTurnBasedMatchmakerViewController")
})
答案 0 :(得分:0)
添加
self.presentedViewController?.dismiss(animated: true, completion: nil)
播放器中的(_:receivedTurnEventFor:didBecomeActive:)