O'Reilly logo

Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch by Kyle Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Presenting Match GUI

We begin by first working with the standard matchmaking GUI provided to us by Apple. Start by first adding a new button to handle presenting the view on the main screen of our test game. I have also gone ahead and renamed the old Play button to Single Player, and created a new button called Multiplayer (see Figure 5–1). We will use the UFOViewController to act as the delegate for our matchmaking behavior, so set the view controller to conform to GKMatchmakerViewControllerDelegate. Additionally, modify the action method of the multiplayer button we just added to match the following code.

- (IBAction)multiplayerButtonPressed; {     GKMatchRequest *request = [[GKMatchRequest alloc] init];     request.minPlayers = 2;     request.maxPlayers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required