---
title: document
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uidocumentviewcontroller/document
---

# document

The document that the controller presents or edits.

## Declaration

```swift
var document: UIDocument? { get set }
```

## Discussion

Discussion This property represents the document that the document view controller displays. The default value of this property is nil. When the value of the document property is nil, the document view controller presents an empty state view with a message to “Select a document by tapping the ‘Documents’ button at the top.” When the value of this property is not nil, the document view controller displays the document.

## See Also

### Managing the document view

- [openDocument(completionHandler:)](uikit/uidocumentviewcontroller/opendocument(completionhandler:).md)
- [documentDidOpen()](uikit/uidocumentviewcontroller/documentdidopen().md)
