ios - 未调用 GKMatchmakerViewController 委托(delegate)方法

标签 ios sdk gamekit gkmatchmaker

我花了几个小时尝试调试这个,所以我想我应该在这里发帖,也许可以帮助一些人解决这个问题!

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

最佳答案

解决方案是我忽略了 Controller 委托(delegate)不是要设置的正确委托(delegate)这一事实!使用 matchmakerDelegate,一切都会好起来的!

controller.matchmakerDelegate = self;

关于ios - 未调用 GKMatchmakerViewController 委托(delegate)方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17264648/

相关文章:

objective-c - GK 成就说明和解锁列表

ios - 带 slider 的自定义 UITableViewCell

ios - 无法从 Observable 对象中提取数据

ios - 枚举键和对象使用 block : can I be sure it is called on the same thread?

sdk - 在JavaCard中,模拟器可以使用PCSC接口(interface)进行通信吗?

iphone - 如何取消或停止 NSThread?

android - 在实际设备中安装 .apk 文件仅用于测试

objective-c - 使用游戏中心发送和接收字符串

ios - 使用 swift 以编程方式填充 UISegmentedControl

iphone - 使用 GameKit 在 iPhone 之间传输 CoreData 数据