<!--
{
  "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/UICollectionViewDelegate/collectionView(_:previewForDismissingContextMenuWithConfiguration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollectionViewDelegate(im)collectionView:previewForDismissingContextMenuWithConfiguration:"
  },
  "title" : "collectionView(_:previewForDismissingContextMenuWithConfiguration:)"
}
-->

# collectionView(_:previewForDismissingContextMenuWithConfiguration:)

Returns the destination view when dismissing a context menu.

```
optional func collectionView(_ collectionView: UICollectionView, previewForDismissingContextMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview?
```

## Parameters

`collectionView`

The collection view object requesting this information.

`configuration`

The configuration of the menu being displayed.

## Return Value

A targeted preview object describing the dismissal preview. The interaction animates the presented menu to the preview. Use this method to customize the dismissal animation.

---

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)