Instance Method


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


- (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id<NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)dropOperation;



The table view that sent the message.


An object that contains more information about this dragging operation.


The index of the proposed target row.


The type of dragging operation.

Return Value

YES if the drop operation was successful, otherwise NO.


The data source should incorporate the data from the dragging pasteboard in the implementation of this method. You can use the draggingPasteboard method to get the data for the drop operation from info.

To accept a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To accept a drop below the last row, row would be [aTableView numberOfRows] and operation would be NSTableViewDropAbove.

See Also

Drag and Drop

- tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:

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

- tableView:validateDrop:proposedRow:proposedDropOperation:

Used by aTableView to determine a valid drop target.

- tableView:writeRowsWithIndexes:toPasteboard:

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

- tableView:draggingSession:willBeginAtPoint:forRowIndexes:

Implement this method to determine when a dragging session will begin.

- tableView:updateDraggingItemsForDrag:

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

- tableView:draggingSession:endedAtPoint:operation:

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