Instance Method

outlineView(_:pasteboardWriterForItem:)

Implement this method to enable the table to be an NSDraggingSource that supports dragging multiple items.

Declaration

optional func outlineView(_ outlineView: NSOutlineView, pasteboardWriterForItem item: 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.