November 2011
Beginner
238 pages
6h 19m
English
Apple provides a default class to present the GUI for creating a new turned-based match. For programmatically creating a match, see the later section “Programmatic Matches.”
We begin by working with a new matchmaker object in the IBAction for the single button that we created in the previous section. The approach that we use here is very similar to iOS 4 Game Center matchmaking. We first alloc and init a copy of GKMatchRequest and set the minimum and maximum players. We then create a new GKTurnedBasedMatchmakerViewController and init it with the match object that we just created. Finally, we set the delegate to self and present the view modally to the user. The user will be presented with a view similar to ...