Instance Method

player(_:wantsToQuitMatch:)

Indicates that the current player wants to quit the current match.

Declaration

optional func player(_ player: GKPlayer, wantsToQuitMatch match: GKTurnBasedMatch)

Parameters

player

The GKPlayer object containing the current player’s information.

match

The GKTurnBasedMatch object containing the current game data.

Discussion

When this method is called, end the current turn and pass the match to the next player by calling participantQuitInTurn(with:nextParticipants:turnTimeout:match:completionHandler:).

See Also

Handling Match-Related Events

func player(GKPlayer, didRequestMatchWithOtherPlayers: [GKPlayer])

Initiates a match from Game Center with the requested players.

func player(GKPlayer, didRequestMatchWithPlayers: [String])

Initiates a match from Game Center with the requested players.

Deprecated