<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/QLPreviewControllerDelegate/previewController(_:didUpdateContentsOf:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "c:objc(pl)QLPreviewControllerDelegate(im)previewController:didUpdateContentsOfPreviewItem:"
  },
  "title" : "previewController(_:didUpdateContentsOf:)"
}
-->

# previewController(_:didUpdateContentsOf:)

Tells the delegate that the content of a preview was updated successfully.

```
optional func previewController(_ controller: QLPreviewController, didUpdateContentsOf previewItem: any QLPreviewItem)
```

## Parameters

`controller`

The controller that displays the preview.

`previewItem`

The preview item for a file.

## Discussion

The platform invokes this callback after the preview controller successfully overwrites the file at the `previewItem’`s [`previewItemURL`](/documentation/QuickLook/QLPreviewItem/previewItemURL) with an updated file.

The platform may invoke the callback multiple times consecutively with the successive edited versions of the preview item. It typically invokes the callback once for each time the user saves their edits.

---

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)