Instance Method

tableView(_:draggingSession:endedAt:operation:)

Implement this method to determine when a dragging session has ended.

Declaration

optional func tableView(_ tableView: NSTableView, draggingSession session: NSDraggingSession, endedAt screenPoint: NSPoint, operation: NSDragOperation)

Parameters

tableView

The table view.

session

The dragging session.

screenPoint

The ending drag location in screen coordinates.

operation

The drag operation. See NSDragOperation for supported values.

Discussion

This delegate method can be used to determine when the dragging source operation ended at a specific location, such as the trash, by checking for an operation of delete.

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.

func tableView(NSTableView, updateDraggingItemsForDrag: NSDraggingInfo)

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