<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableViewDataSource/tableView(_:draggingSession:endedAt:operation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTableViewDataSource(im)tableView:draggingSession:endedAtPoint:operation:"
  },
  "title" : "tableView(_:draggingSession:endedAt:operation:)"
}
-->

# tableView(_:draggingSession:endedAt:operation:)

Implement this method to determine when a dragging session has ended.

```
@MainActor optional func tableView(_ tableView: NSTableView, draggingSession session: NSDraggingSession, endedAt screenPoint: NSPoint, operation: NSDragOperation)
```

## Parameters

`tableView`

The table view.

`session`

The dragging session.

`screenPoint`

The ending drag location in screen coordinates.

`operation`

The drag operation. See [`NSDragOperation`](/documentation/AppKit/NSDragOperation) for supported values.

## Discussion

This delegate method can be used to determine when the dragging source operation ended at a specific location, such as the trash, by checking for an operation of [`delete`](/documentation/AppKit/NSDragOperation/delete).

---

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)