Contents

previewController(_:transitionViewFor:)

Tells the delegate that the system is about to present the preview full screen or dismiss it, and asks for information to provide a smooth transition when zooming.

Declaration

optional func previewController(_ controller: QLPreviewController, transitionViewFor item: any QLPreviewItem) -> UIView?

Parameters

  • controller:

    The Qlpreviewcontroller that’s requesting the view for the preview item.

  • item:

    The item to preview or dismiss.

Return Value

A UIView object that the preview controller cross-fades with when zooming.

Discussion

Starting with macOS 11, animated transitions are available for Mac apps built with Mac Catalyst. On Mac computers running a version earlier than macOS 11, the system doesn’t call this delegate method.

See Also

Responding to preview requests