2013-06-23 152 views
0

我花了幾個小時試圖調試這個,所以我想我會在這裏發佈,以幫助或許可以幫助別人解決頭痛問題!GKMatchmakerViewController委託方法不被調用

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

回答

2

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

controller.matchmakerDelegate = self;