gpt4 book ai didi

ios - 如何自定义 GKMatchmakerViewController

转载 作者:行者123 更新时间:2023-12-01 17:06:32 25 4
gpt4 key购买 nike

我想创建一个自定义 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];

最佳答案

您需要从头开始创建自定义 View Controller 。然后使用 loadMatchesWithCompletionHandler: 加载匹配项方法。然后您可以在 Controller 上显示您的匹配项,例如使用 UITableView .见 GKTurnBasedMatch Class Reference了解更多信息。

关于ios - 如何自定义 GKMatchmakerViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30054439/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com