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

# outlineView(_:acceptDrop:item:childIndex:)

Returns a Boolean value that indicates whether a drop operation was successful.

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, acceptDrop info: any NSDraggingInfo, item: Any?, childIndex index: Int) -> Bool
```

## Parameters

`outlineView`

The outline view that sent the message. `outlineView` must have previously allowed a drop.

`info`

An object that contains more information about this dragging operation.

`item`

The parent of the item over which the cursor was placed when the mouse button was released.

`index`

The index of the child of `item` over which the cursor was placed when the mouse button was released.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the drop operation was successful, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The data source should incorporate the data from the dragging pasteboard in the implementation of this method. You can get the data for the drop operation from info using the [`draggingPasteboard`](/documentation/AppKit/NSDraggingInfo/draggingPasteboard) method.

The return value indicates success or failure of the drag operation to the system.

## See Also

[`-  shouldCollapseAutoExpandedItemsForDeposited:`](/documentation/AppKit/NSOutlineView/shouldCollapseAutoExpandedItems(forDeposited:))

Returns a Boolean value that indicates whether auto-expanded items should return to their original collapsed state.



---

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)