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

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

Implement this method to know when the given dragging session has ended.

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

## Parameters

`outlineView`

The outline view in which the drag began.

`session`

The dragging session that ended.

`screenPoint`

The point onscreen at which the drag ended.

`operation`

A mask specifying the types of drag operations permitted by the dragging source.

## Discussion

You can implement this optional delegate method to know 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)