GKMatchmakerViewController委托方法未被调用



我花了几个小时试图调试这个,所以我想我应该在这里发帖,也许可以帮别人省去头疼的事!

GKMatchRequest *matchRequest = [[GKMatchRequest alloc] init];
matchRequest.minPlayers = 2;
matchRequest.maxPlayers = 2;
GKMatchmakerViewController *controller = [[GKMatchmakerViewController alloc] initWithMatchRequest:matchRequest];
controller.delegate = self;

解决方案是我忽略了控制器委托不是要设置的正确委托这一事实!使用matherDelegate,一切都会好起来的!

controller.matchmakerDelegate = self;

最新更新