Mac Developer Library

Developer

GameKit Framework Reference GKTurnBasedMatchmakerViewController Class Reference

Options
Deployment Target:

On This Page
Language:

GKTurnBasedMatchmakerViewController

The GKTurnBasedMatchmakerViewController class displays a user interface that allows players to manage the turn-based matches that they are participating in. More...

Inheritance


Import Statement


import GameKit @import GameKit;

Availability


Available in OS X v10.8 and later.
  • Initializes a new matchmaker view controller.

    Declaration

    Swift

    init!(matchRequest request: GKMatchRequest!)

    Objective-C

    - (id)initWithMatchRequest:(GKMatchRequest *)request

    Parameters

    request

    A match request with parameters for the match.

    Return Value

    An initialized matchmaker view controller. If an error occurred, this method returns NIL.

    Import Statement

    import GameKit

    Availability

    Available in OS X v10.8 and later.

  • The view controller’s delegate.

    Declaration

    Swift

    unowned(unsafe) var turnBasedMatchmakerDelegate: GKTurnBasedMatchmakerViewControllerDelegate!

    Objective-C

    @property(nonatomic, readwrite, assign) id< GKTurnBasedMatchmakerViewControllerDelegate > turnBasedMatchmakerDelegate

    Discussion

    Your game must implement the delegate protocol on an object and assign that object to this property before presenting the view controller.

    Import Statement

    import GameKit

    Availability

    Available in OS X v10.8 and later.

  • A Boolean value that determines whether the view controller shows existing matches.

    Declaration

    Swift

    var showExistingMatches: Bool

    Objective-C

    @property(nonatomic, readwrite, assign) BOOL showExistingMatches

    Discussion

    If the value of this property is YEStrue, the view controller shows matches that are already in progress. If the value of this property is NOfalse, the view controller only offers the ability to create new matches. The default value is YEStrue.

    Import Statement

    import GameKit

    Availability

    Available in OS X v10.8 and later.