---
title: "matchmakerViewControllerWasCancelled(_:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontrollerwascancelled(_:)"
---

# matchmakerViewControllerWasCancelled(_:)

Handles when a player cancels a request to find players for a match.

## Declaration

```swift
func matchmakerViewControllerWasCancelled(_ viewController: GKMatchmakerViewController)
```

## Parameters

- `viewController`: The view controller that the player cancels.

## Mentioned in

Finding multiple players for a game

## Discussion

Discussion This method needs to dismiss the view controller.

## See Also

### Handling cancellations and errors

- [matchmakerViewController(_:didFailWithError:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didfailwitherror:).md)
