Contents

previewController(_:didUpdateContentsOf:)

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

Declaration

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 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.

See Also

Editing the content of a preview