簡體   English   中英

沒有調用GKMatchmakerViewController委托方法

[英]GKMatchmakerViewController delegate methods not being called

我花了好幾個小時試圖調試這個,所以我想我會在這里發帖,以幫助解決讓人頭痛的問題!

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

解決方案是我錯過了控制器委托不是要設置的正確委托的事實! 使用matchmakerDelegate,一切都會好的!

controller.matchmakerDelegate = self;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM