Instance Method

tableView(_:updateDraggingItemsForDrag:)

Implement this method to allow the table to update dragging items as they are dragged over a view.

Declaration

optional func tableView(_ tableView: NSTableView, updateDraggingItemsForDrag draggingInfo: NSDraggingInfo)

Parameters

tableView

The table view.

draggingInfo

The dragging information.

Discussion

Required for multi-image dragging. Typically this will involve invoking enumerateDraggingItems(options:for:classes:searchOptions:using:) on the draggingInfo parameter value and setting the draggingItem object’s imageComponentsProvider to a proper image based on the content.

For view-based table views, you can use the NSTableCellView method draggingImageComponents. For cell-based tables, use the NSCell method draggingImageComponents(withFrame:in:).

See Also

Drag and Drop

func tableView(NSTableView, acceptDrop: NSDraggingInfo, row: Int, dropOperation: NSTableView.DropOperation) -> Bool

Called by aTableView when the mouse button is released over a table view that previously decided to allow a drop.

func tableView(NSTableView, namesOfPromisedFilesDroppedAtDestination: URL, forDraggedRowsWith: IndexSet) -> [String]

Returns an array of filenames that represent the indexSet rows for a drag to dropDestination.

Deprecated
func tableView(NSTableView, writeRowsWith: IndexSet, to: NSPasteboard) -> Bool

Returns a Boolean value that indicates whether a drag operation is allowed.

Deprecated