<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContextMenuContentPreviewProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UIContextMenuContentPreviewProvider"
  },
  "title" : "UIContextMenuContentPreviewProvider"
}
-->

# UIContextMenuContentPreviewProvider

Returns the custom view controller to use when previewing your content.

```
typealias UIContextMenuContentPreviewProvider = () -> UIViewController?
```

## Return Value

The view controller to display in place of the system’s standard view controller. If you want UIKit to present your content using a default view controller, return `nil`.

## Discussion

Use this handler to load or create your custom view controller, configure it with your content, and return it to UIKit.

---

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)