outlineView(_:pasteboardWriterForItem:)
Implement this method to enable the table to be an NSDraggingSource that supports dragging multiple items.
Declaration
@MainActor optional func outlineView(_ outlineView: NSOutlineView, pasteboardWriterForItem item: Any) -> (any NSPasteboardWriting)?Parameters
- outlineView:
The outline view in which the drag begins.
- item:
The item for which to return a pasteboard writer.
Return Value
A custom object that implements NSPasteboardWriting protocol (or simply use NSPasteboardItem).
Discussion
If this method is implemented, then outlineView(_:writeItems:to:) is not called.
See Also
Instance Methods
outlineView(_:acceptDrop:item:childIndex:)outlineView(_:child:ofItem:)outlineView(_:draggingSession:endedAt:operation:)outlineView(_:draggingSession:willBeginAt:forItems:)outlineView(_:isItemExpandable:)outlineView(_:itemForPersistentObject:)outlineView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)outlineView(_:numberOfChildrenOfItem:)outlineView(_:objectValueFor:byItem:)outlineView(_:persistentObjectForItem:)outlineView(_:setObjectValue:for:byItem:)outlineView(_:sortDescriptorsDidChange:)outlineView(_:updateDraggingItemsForDrag:)outlineView(_:validateDrop:proposedItem:proposedChildIndex:)outlineView(_:writeItems:to:)