browser(_:writeRowsWith:inColumn:to:)
Determines whether a drag operation can proceed. This method is required for a browser to be a drag source.
Declaration
@MainActor optional func browser(_ browser: NSBrowser, writeRowsWith rowIndexes: IndexSet, inColumn column: Int, to pasteboard: NSPasteboard) -> BoolParameters
- browser:
The browser.
- rowIndexes:
The indexes of the rows the user is dragging.
- column:
The index of the column containing the dragged rows.
- pasteboard:
The pasteboard containing the content from the dragged rows.
Return Value
true to allow the dragging operation to proceed (see discussion for further details); false to disallow it.
Discussion
This method is called after a drag operation has been allowed to start (browser(_:canDragRowsWith:inColumn:with:) returns true), but before it actually begins.