turnBasedMatchmakerViewController(_:playerQuitFor:)
Handles when a player quits the match.
Declaration
optional func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, playerQuitFor match: GKTurnBasedMatch)Parameters
- viewController:
The view controller with which the player interacts.
- match:
The match that the player quits.
Discussion
When GameKit invokes this method, the player forfeits the match without taking their turn. Implement this method to dismiss the view controller, set an outcome for the player, and then call the match’s participantQuitInTurn(with:nextParticipants:turnTimeout:match:completionHandler:) method.