---
title: "documentPickerWasCancelled(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uidocumentpickerdelegate/documentpickerwascancelled(_:)"
---

# documentPickerWasCancelled(_:)

Tells the delegate that the user canceled the document picker.

## Declaration

```swift
optional func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController)
```

## Parameters

- `controller`: The document picker that called this method.

## Mentioned in

Providing access to directories

## See Also

### Responding to user actions

- [documentPicker(_:didPickDocumentsAt:)](uikit/uidocumentpickerdelegate/documentpicker(_:didpickdocumentsat:).md)
- [documentPicker(_:didPickDocumentAt:)](uikit/uidocumentpickerdelegate/documentpicker(_:didpickdocumentat:).md)
