Contents

previewController(_:didSaveEditedCopyOf:at:)

Tells the delegate that the preview item’s edited content was successfully saved to a copy at the given URL.

Declaration

optional func previewController(_ controller: QLPreviewController, didSaveEditedCopyOf previewItem: any QLPreviewItem, at modifiedContentsURL: URL)

Parameters

  • controller:

    The controller that displays the preview.

  • previewItem:

    The preview item for a file.

  • modifiedContentsURL:

    A URL pointing to a temporary file that contains the edited version of the previewed file.

Discussion

The platform invokes this callback with an edited copy of the preview item at modifiedContentsURL. It invokes the callback in the following scenarios:

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