<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/QLPreviewControllerDelegate/previewController(_:transitionImageFor:contentRect:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "c:objc(pl)QLPreviewControllerDelegate(im)previewController:transitionImageForPreviewItem:contentRect:"
  },
  "title" : "previewController(_:transitionImageFor:contentRect:)"
}
-->

# previewController(_:transitionImageFor:contentRect:)

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.

```
optional func previewController(_ controller: QLPreviewController, transitionImageFor item: any QLPreviewItem, contentRect: UnsafeMutablePointer<CGRect>) -> UIImage?
```

## Parameters

`controller`

The [`QLPreviewController`](/documentation/QuickLook/QLPreviewController) that’s requesting the image for the preview item.

`item`

The item to preview or dismiss.

`contentRect`

The rectangle within the image that represents the document content. For icons, for example, the document content rectangle is typically smaller than the icon rectangle itself.

## Return Value

A <doc://com.apple.documentation/documentation/UIKit/UIImage> object that the preview controller cross-fades with when zooming.

## Discussion> Note:
> 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)