没有调用GKMatchmakerViewController委托方法

时间:2013-06-23 19:49:38

标签: ios sdk gamekit gkmatchmaker

我花了好几个小时试图调试这个,所以我想我会在这里发帖,以帮助或许让别人头疼!

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

1 个答案:

答案 0 :(得分:2)

解决方案是我错过了控制器委托不是要设置的正确委托的事实!使用matchmakerDelegate,一切都会好的!

controller.matchmakerDelegate = self;