Instance Method

outlineView(_:acceptDrop:item:childIndex:)

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

Declaration

optional func outlineView(_ outlineView: NSOutlineView, acceptDrop info: 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

true if the drop operation was successful, otherwise 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 method.

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

See Also