---
title: "collectionView(_:draggingSession:willBeginAt:forItemsAt:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscollectionviewdelegate/collectionview(_:draggingsession:willbeginat:foritemsat:)-cpuq"
---

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

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

## Declaration

```swift
@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

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

## See Also

### Legacy Collection View Support

- [collectionView(_:canDragItemsAt:with:)](appkit/nscollectionviewdelegate/collectionview(_:candragitemsat:with:)-39rjh.md)
- [collectionView(_:pasteboardWriterForItemAt:)](appkit/nscollectionviewdelegate/collectionview(_:pasteboardwriterforitemat:)-7ldvs.md)
- [collectionView(_:writeItemsAt:to:)](appkit/nscollectionviewdelegate/collectionview(_:writeitemsat:to:)-a1lk.md)
- [collectionView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAt:)](appkit/nscollectionviewdelegate/collectionview(_:namesofpromisedfilesdroppedatdestination:fordraggeditemsat:)-wwec.md)
- [collectionView(_:draggingImageForItemsAt:with:offset:)](appkit/nscollectionviewdelegate/collectionview(_:draggingimageforitemsat:with:offset:)-4yvk5.md)
- [collectionView(_:validateDrop:proposedIndex:dropOperation:)](appkit/nscollectionviewdelegate/collectionview(_:validatedrop:proposedindex:dropoperation:).md)
- [collectionView(_:acceptDrop:index:dropOperation:)](appkit/nscollectionviewdelegate/collectionview(_:acceptdrop:index:dropoperation:).md)
