Instance Method

turnBasedMatchmakerViewController(_:playerQuitFor:)

Called when a player chooses to quit the match.

Declaration

optional func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, playerQuitFor match: GKTurnBasedMatch)

Parameters

viewController

The view controller that the player interacted with.

match

The match the player has chosen to quit.

Discussion

When this method is called, the player is the current participant in the match, but that player has chosen to resign the match instead of taking a turn. Your game should dismiss the view controller, set an outcome for the player, and then call the match’s participantQuitInTurn(with:nextParticipant:match:completionHandler:) method.