[英]How to customize a GKMatchmakerViewController
我想創建一個自定義的GKMatchMakerViewController
使用標准ViewController
編碼(彩色氣泡):
if([GKLocalPlayer localPlayer].isAuthenticated){
GKMatchRequest *request = [[GKMatchRequest alloc] init] ;
request.minPlayers = 2;
request.maxPlayers = 2;
GKMatchmakerViewController *MM = [[GKMatchmakerViewController alloc] initWithMatchRequest:request];
MM.matchmakerDelegate = self;
[self presentViewController:mmvc animated:YES completion:nil];
您需要從頭開始創建自定義視圖控制器。 然后,使用loadMatchesWithCompletionHandler:
方法加載匹配loadMatchesWithCompletionHandler:
。 然后,您可以在控制器上顯示匹配項,例如使用UITableView
。 有關更多信息,請參見GKTurnBasedMatch類參考 。
將MM(在2個地方)更改為mmvc或將mmvc(在一個地方)更改為MM
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.