---
title: "previewController(_:transitionViewFor:)"
framework: quicklook
role: symbol
role_heading: Instance Method
path: "quicklook/qlpreviewcontrollerdelegate/previewcontroller(_:transitionviewfor:)"
---

# 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

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

## Parameters

- `controller`: The doc://com.apple.quicklook/documentation/QuickLook/QLPreviewController that’s requesting the view for the preview item.
- `item`: The item to preview or dismiss.

## Return Value

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

## Discussion

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

- [previewController(_:frameFor:inSourceView:)](quicklook/qlpreviewcontrollerdelegate/previewcontroller(_:framefor:insourceview:).md)
- [previewController(_:transitionImageFor:contentRect:)](quicklook/qlpreviewcontrollerdelegate/previewcontroller(_:transitionimagefor:contentrect:).md)
- [previewControllerWillDismiss(_:)](quicklook/qlpreviewcontrollerdelegate/previewcontrollerwilldismiss(_:).md)
- [previewControllerDidDismiss(_:)](quicklook/qlpreviewcontrollerdelegate/previewcontrollerdiddismiss(_:).md)
