Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only use Automatch in Gamecenter

How do you remove the invite friend button from a GKMatchmakerViewController?

When printing all of the subviews in it I only see the navigation bar.

I am presenting it like this:

GKMatchmakerViewController *mmvc = [[GKMatchmakerViewController alloc] initWithMatchRequest:request];

mmvc.matchmakerDelegate = self;

[viewController presentViewController:mmvc animated:YES completion:nil];
like image 863
Wyetro Avatar asked Jun 01 '15 07:06

Wyetro


1 Answers

Unfortunately it isn't possible, i looked into removing the quick match button myself and found it couldn't be done.

You can however set up your own custom invite screen, check out the 'Implementing a Custom Match User Interface' section in the 'Real Time Matches' section of the iOS documentation. There are too many code examples to show here I'll just have to supply the description and link:

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Matchmaking/Matchmaking.html

DESCRIPTION

Implementing a complete custom match interface can be as simple as displaying a network progress indicator until auto-matching completes, or as sophisticated as implementing a complete custom view controller that replicates the standard behavior. The latter is potentially a significant investment in programming time, as it needs to include support for all of the following:

  • Inviting specific players into a match
  • Listening for responses from invited players
  • Looking for nearby players (available via Wi-Fi or Bluetooth)
like image 87
ryan.tait Avatar answered Oct 13 '22 04:10

ryan.tait