<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentInteractionController/presentPreview(animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocumentInteractionController(im)presentPreviewAnimated:"
  },
  "title" : "presentPreview(animated:)"
}
-->

# presentPreview(animated:)

Displays a full-screen preview of the target document.

```
func presentPreview(animated: Bool) -> Bool
```

## Parameters

`animated`

Specify <doc://com.apple.documentation/documentation/Swift/true> to animate the appearance of the document preview or <doc://com.apple.documentation/documentation/Swift/false> to display it immediately.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if this method was able to display the document preview or <doc://com.apple.documentation/documentation/Swift/false> if it was not.

## Discussion

To use this method, you must first provide a delegate object that implements the [`documentInteractionControllerViewControllerForPreview(_:)`](/documentation/UIKit/UIDocumentInteractionControllerDelegate/documentInteractionControllerViewControllerForPreview(_:)) method. The view controller returned by that method is used to present the document preview modally.

If your delegate implements the [`documentInteractionControllerViewForPreview(_:)`](/documentation/UIKit/UIDocumentInteractionControllerDelegate/documentInteractionControllerViewForPreview(_:)) and [`documentInteractionControllerRectForPreview(_:)`](/documentation/UIKit/UIDocumentInteractionControllerDelegate/documentInteractionControllerRectForPreview(_:)) methods, the view and rectangle returned by those methods is used as the starting point for the animation used to display the document preview. If the animated parameter is <doc://com.apple.documentation/documentation/Swift/true> but your delegate does not implement the [`documentInteractionControllerViewForPreview(_:)`](/documentation/UIKit/UIDocumentInteractionControllerDelegate/documentInteractionControllerViewForPreview(_:)) method (or that method returns `nil`), the document preview is animated into place using a crossfade transition.

This method displays the document preview asynchronously. The document interaction controller dismisses the document preview automatically in response to appropriate user interactions. You can also dismiss the preview programmatically using the [`dismissPreview(animated:)`](/documentation/UIKit/UIDocumentInteractionController/dismissPreview(animated:)) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)