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

# collectionView(_:updateDraggingItemsForDrag:)

Asks your delegate to update the dragging items during a drag operation.

```
@MainActor optional func collectionView(_ collectionView: NSCollectionView, updateDraggingItemsForDrag draggingInfo: any NSDraggingInfo)
```

## Parameters

`collectionView`

The collection view asking you to update the dragging items.

`draggingInfo`

The current information for the drag operation. Use this object to iterate over the dragging items.

## Discussion

You can use this method to update the current drag items while a drag is in progress. Updating the drag items is optional, but you might use this method to change the image for an item. For example, you might change the image when the mouse hovers over a particular part of the collection view. Use the [`enumerateDraggingItems(options:for:classes:searchOptions:using:)`](/documentation/AppKit/NSDraggingInfo/enumerateDraggingItems(options:for:classes:searchOptions:using:)) method of the `draggingInfo` parameter to iterate over the drag items and update them as appropriate.

---

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)