GKMatchmakerViewController委托方法不被调用
问题描述:
我花了几个小时试图调试这个,所以我想我会在这里发布,以帮助或许可以帮助别人解决头痛问题!GKMatchmakerViewController委托方法不被调用
GKMatchRequest *matchRequest = [[GKMatchRequest alloc] init];
matchRequest.minPlayers = 2;
matchRequest.maxPlayers = 2;
GKMatchmakerViewController *controller = [[GKMatchmakerViewController alloc] initWithMatchRequest:matchRequest];
controller.delegate = self;
答
解决方案是,我错过了控制器委托不是正确的代表设置的事实!使用matchmakerDelegate,一切都会很好!
controller.matchmakerDelegate = self;