Contents

setDropRow(_:dropOperation:)

Retargets the proposed drop operation.

Declaration

func setDropRow(_ row: Int, dropOperation: NSTableView.DropOperation)

Parameters

  • row:

    The target row index.

  • dropOperation:

    The drop operation. Supported values are specified by Dropoperation.

Discussion

For example, to specify a drop on the second row, specify row as 1, and operation as NSTableViewDropOn. To specify a drop below the last row, specify row as [self numberOfRows] and operation as NSTableViewDropAbove.

Passing a value of –1 for row and NSTableViewDropOn as the operation causes the entire table view to be highlighted rather than a specific row. This is useful if the data displayed by the table view does not allow the user to drop items at a specific row location.

See Also

Dragging