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

# collectionView(_:draggingSession:willBeginAt:forItemsAt:)

Notifies your delegate that a drag session is about to begin.

```
@MainActor optional func collectionView(_ collectionView: NSCollectionView, draggingSession session: NSDraggingSession, willBeginAt screenPoint: NSPoint, forItemsAt indexes: IndexSet)
```

## Parameters

`collectionView`

The collection view notifying your delegate object.

`session`

The dragging session that is about to begin.

`screenPoint`

The starting point (in screen coordinates) for the drag operation.

`indexes`

The indexes of the items being dragged.

## Discussion

You can use this method to modify the dragging session or to perform other tasks related to the beginning of a drag session.

---

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)