<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableViewDataSource/tableView(_:updateDraggingItemsForDrag:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTableViewDataSource(im)tableView:updateDraggingItemsForDrag:"
  },
  "title" : "tableView(_:updateDraggingItemsForDrag:)"
}
-->

# tableView(_:updateDraggingItemsForDrag:)

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

```
@MainActor optional func tableView(_ tableView: NSTableView, updateDraggingItemsForDrag draggingInfo: any 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:)`](/documentation/AppKit/NSDraggingInfo/enumerateDraggingItems(options:for:classes:searchOptions:using:)) on the `draggingInfo` parameter value and setting the `draggingItem` object’s [`imageComponentsProvider`](/documentation/AppKit/NSDraggingItem/imageComponentsProvider) to a proper image based on the content.

For view-based table views, you can use the `NSTableCellView` method [`draggingImageComponents`](/documentation/AppKit/NSTableCellView/draggingImageComponents). For cell-based tables, use the `NSCell` method [`draggingImageComponents(withFrame:in:)`](/documentation/AppKit/NSCell/draggingImageComponents(withFrame:in:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)