---
title: "dragInteraction(_:session:willEndWith:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uidraginteractiondelegate/draginteraction(_:session:willendwith:)"
---

# dragInteraction(_:session:willEndWith:)

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

## Declaration

```swift
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 doc://com.apple.uikit/documentation/UIKit/UIDropOperation/cancel or doc://com.apple.uikit/documentation/UIKit/UIDropOperation/forbidden, update your view so it has the corresponding appearance before the cancellation animation begins.

## See Also

### Monitoring drag progress

- [dragInteraction(_:sessionWillBegin:)](uikit/uidraginteractiondelegate/draginteraction(_:sessionwillbegin:).md)
- [dragInteraction(_:session:willAdd:for:)](uikit/uidraginteractiondelegate/draginteraction(_:session:willadd:for:).md)
- [dragInteraction(_:sessionDidMove:)](uikit/uidraginteractiondelegate/draginteraction(_:sessiondidmove:).md)
- [dragInteraction(_:session:didEndWith:)](uikit/uidraginteractiondelegate/draginteraction(_:session:didendwith:).md)
- [dragInteraction(_:sessionDidTransferItems:)](uikit/uidraginteractiondelegate/draginteraction(_:sessiondidtransferitems:).md)
