<!--
{
  "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(_:session:willEndWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIDragInteractionDelegate(im)dragInteraction:session:willEndWithOperation:"
  },
  "title" : "dragInteraction(_:session:willEndWith:)"
}
-->

# dragInteraction(_:session:willEndWith:)

Tells the delegate the drag activity will end with the specified operation.

```
optional func dragInteraction(_ interaction: UIDragInteraction, session: any UIDragSession, willEndWith operation: UIDropOperation)
```

## Parameters

`interaction`

The interaction that called this method.

`session`

The drag session that will end.

`operation`

A type that describes the drop operation. If the operation is [`UIDropOperation.cancel`](/documentation/UIKit/UIDropOperation/cancel) or [`UIDropOperation.forbidden`](/documentation/UIKit/UIDropOperation/forbidden), update your view so it has the corresponding appearance before the cancellation animation begins.

---

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)