<!--
{
  "availability" : [
    "iOS: 13.0.0 - 16.0.0",
    "iPadOS: 13.0.0 - 16.0.0",
    "macCatalyst: 13.1.0 - 16.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContextMenuInteractionDelegate/contextMenuInteraction(_:previewForDismissingMenuWithConfiguration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIContextMenuInteractionDelegate(im)contextMenuInteraction:previewForDismissingMenuWithConfiguration:"
  },
  "title" : "contextMenuInteraction(_:previewForDismissingMenuWithConfiguration:)"
}
-->

# contextMenuInteraction(_:previewForDismissingMenuWithConfiguration:)

Returns the destination view to use when animating the appearance of the preview interface.

```
optional func contextMenuInteraction(_ interaction: UIContextMenuInteraction, previewForDismissingMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview?
```

## Parameters

`interaction`

The interaction object that triggered the preview.

`configuration`

The configuration object associated with the current interaction.

## Return Value

An object containing the destination view and configuration parameters for the animation.

## Discussion

When the user dismisses the preview interface, UIKit animates that interface to the view you specify in the returned [`UITargetedPreview`](/documentation/UIKit/UITargetedPreview) object.

---

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)