---
title: delegate
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uidocumentpickerviewcontroller/delegate
---

# delegate

An object that acts as the delegate of the view controller.

## Declaration

```swift
weak var delegate: (any UIDocumentPickerDelegate)? { get set }
```

## Discussion

Discussion The delegate must adopt the UIDocumentPickerDelegate protocol.

## See Also

### Getting the user-selected document

- [UIDocumentPickerDelegate](uikit/uidocumentpickerdelegate.md)
- [allowsMultipleSelection](uikit/uidocumentpickerviewcontroller/allowsmultipleselection.md)
- [directoryURL](uikit/uidocumentpickerviewcontroller/directoryurl.md)
