Protocol

QLPreviewControllerDataSource

The data source for a preview controller must adopt this protocol to provide preview items to the controller.

Declaration

protocol QLPreviewControllerDataSource

Overview

This protocol also lets the data source tell the QLPreviewController how many items to include in a preview item navigation list.

This protocol's methods are required.

Topics

Providing Data to a Quick Look Preview Controller

func numberOfPreviewItems(in: QLPreviewController) -> Int

Invoked when the Quick Look preview controller needs to know the number of preview items to include in the preview navigation list.

Required.

func previewController(QLPreviewController, previewItemAt: Int) -> QLPreviewItem

Invoked when the Quick Look preview controller needs the preview item for a specified index position.

Required.