---
title: "turnBasedMatchmakerViewController(_:playerQuitFor:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkturnbasedmatchmakerviewcontrollerdelegate/turnbasedmatchmakerviewcontroller(_:playerquitfor:)"
---

# turnBasedMatchmakerViewController(_:playerQuitFor:)

Handles when a player quits the match.

## Declaration

```swift
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

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.

## See Also

### Deprecated Methods

- [turnBasedMatchmakerViewController(_:didFind:)](gamekit/gkturnbasedmatchmakerviewcontrollerdelegate/turnbasedmatchmakerviewcontroller(_:didfind:).md)
