<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDragInteractionDelegate/dragInteraction(_:previewForCancelling:withDefault:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIDragInteractionDelegate(im)dragInteraction:previewForCancellingItem:withDefault:"
  },
  "title" : "dragInteraction(_:previewForCancelling:withDefault:)"
}
-->

# dragInteraction(_:previewForCancelling:withDefault:)

Asks the delegate for the targeted drag item preview to show during the cancellation animation.

```
optional func dragInteraction(_ interaction: UIDragInteraction, previewForCancelling item: UIDragItem, withDefault defaultPreview: UITargetedDragPreview) -> UITargetedDragPreview?
```

## Parameters

`interaction`

The interaction that called this method.

`item`

The drag item represented by the preview.

`defaultPreview`

A targeted drag preview provided by the system.

## Return Value

- The default preview provided by the system.
- A targeted drag item preview you create.
- The preview returned after moving to a new preview target (using the `defaultPreview`’s [`retargetedPreview(with:)`](/documentation/UIKit/UITargetedDragPreview/retargetedPreview(with:)) method).
- `nil` to fade the preview that is currently displayed to the user, which is the same behavior as not implementing this method.

## Discussion

The system calls this method multiple times, once for each visible drag item.

When you return a preview, the system shows it during the cancellation animation in order to visually “move” the drag item to the location of the preview’s associated `view`.

---

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)