---
title: "tableView(_:pasteboardWriterForRow:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableviewdatasource/tableview(_:pasteboardwriterforrow:)"
---

# tableView(_:pasteboardWriterForRow:)

Called to allow the table to support multiple item dragging.

## Declaration

```swift
@MainActor optional func tableView(_ tableView: NSTableView, pasteboardWriterForRow row: Int) -> (any NSPasteboardWriting)?
```

## Parameters

- `tableView`: The table view.
- `row`: The row.

## Return Value

Return Value Returns an instance of NSPasteboardItem or a custom object that implements the NSPasteboardWriting protocol. Returning nil excludes the row from being dragged.

## Discussion

Discussion This method is required for multi-image dragging. If this method is implemented, then tableView(_:writeRowsWith:to:) will not be called.
