Protocol

QLPreviewItem

The QLPreviewItem protocol defines properties you implement to make your application’s content visible in a QuickLook preview (QLPreviewController in iOS or QLPreviewPanel in macOS).

Overview

The methods in this protocol are also declared as a category on the NSURL class. As a result, you can use NSURL objects directly as preview items—provided that you want to use the default titles of those items. A default title is the last path component of an item’s URL. If you want to supply your own preview item titles, create your own preview item objects that adopt this protocol.

Symbols

Providing the Preview Item URL

var previewItemURL: URL?
Required.

The URL of the item to preview.

Providing Display Information for the Preview Item

var previewItemTitle: String?

The title to display for the preview item.

var previewItemDisplayState: Any!

The display state for the preview item. This property is optional.

Relationships

Inherits From

Adopted By