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

# outlineView(_:validateDrop:proposedItem:proposedChildIndex:)

Used by an outline view to determine a valid drop target.

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, validateDrop info: any NSDraggingInfo, proposedItem item: Any?, proposedChildIndex index: Int) -> NSDragOperation
```

## Parameters

`outlineView`

The outline view that sent the message.

`info`

An object that contains more information about this dragging operation.

`item`

The proposed parent.

`index`

The proposed child location.

## Return Value

A value that indicates which dragging operation the data source will perform.

## Discussion

Based on the mouse position, the outline view will suggest a proposed drop location. The data source may “retarget” a drop if desired by calling [`setDropItem(_:dropChildIndex:)`](/documentation/AppKit/NSOutlineView/setDropItem(_:dropChildIndex:)) and returning something other than `NSDragOperationNone`. You may choose to retarget for various reasons (for example, for better visual feedback when inserting into a sorted position).

Implementation of this method is optional.

---

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)