outlineView(_:acceptDrop:item:childIndex:)
Returns a Boolean value that indicates whether a drop operation was successful.
Declaration
@MainActor optional func outlineView(_ outlineView: NSOutlineView, acceptDrop info: any NSDraggingInfo, item: Any?, childIndex index: Int) -> BoolParameters
- outlineView:
The outline view that sent the message.
outlineViewmust 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
itemover which the cursor was placed when the mouse button was released.
Return Value
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 method.
The return value indicates success or failure of the drag operation to the system.
See Also
Related Documentation
Instance Methods
outlineView(_:child:ofItem:)outlineView(_:draggingSession:endedAt:operation:)outlineView(_:draggingSession:willBeginAt:forItems:)outlineView(_:isItemExpandable:)outlineView(_:itemForPersistentObject:)outlineView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)outlineView(_:numberOfChildrenOfItem:)outlineView(_:objectValueFor:byItem:)outlineView(_:pasteboardWriterForItem:)outlineView(_:persistentObjectForItem:)outlineView(_:setObjectValue:for:byItem:)outlineView(_:sortDescriptorsDidChange:)outlineView(_:updateDraggingItemsForDrag:)outlineView(_:validateDrop:proposedItem:proposedChildIndex:)outlineView(_:writeItems:to:)