Instance Property

previewItem

The item to preview.

Declaration

var previewItem: QLPreviewItem! { get set }

Discussion

Any item that you wish to preview must conform to the QLPreviewItem protocol. When you set this property, the QLPreviewView will load the preview asynchronously. Due to this asynchronous behavior, you can’t assume that the preview is ready immediately after assigning it to this property.

See Also

Displaying a Preview

func refreshPreviewItem()

Updates the preview to display the currently previewed item.

var displayState: Any!

The current display state of the previewItem.

var autostarts: Bool

A Boolean value that determines whether the preview starts automatically.