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

# 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 indexPaths: Set<IndexPath>)
```

## 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.
- `indexPaths`: The index paths 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

### Drag and Drop Support

- [Supporting Collection View Drag and Drop Through File Promises](appkit/supporting-collection-view-drag-and-drop-through-file-promises.md)
- [collectionView(_:canDragItemsAt:with:)](appkit/nscollectionviewdelegate/collectionview(_:candragitemsat:with:)-49wix.md)
- [collectionView(_:pasteboardWriterForItemAt:)](appkit/nscollectionviewdelegate/collectionview(_:pasteboardwriterforitemat:)-5eyyl.md)
- [collectionView(_:writeItemsAt:to:)](appkit/nscollectionviewdelegate/collectionview(_:writeitemsat:to:)-23ozm.md)
- [collectionView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAt:)](appkit/nscollectionviewdelegate/collectionview(_:namesofpromisedfilesdroppedatdestination:fordraggeditemsat:)-6yag4.md)
- [collectionView(_:draggingImageForItemsAt:with:offset:)](appkit/nscollectionviewdelegate/collectionview(_:draggingimageforitemsat:with:offset:)-898js.md)
- [collectionView(_:draggingSession:endedAt:dragOperation:)](appkit/nscollectionviewdelegate/collectionview(_:draggingsession:endedat:dragoperation:).md)
- [collectionView(_:updateDraggingItemsForDrag:)](appkit/nscollectionviewdelegate/collectionview(_:updatedraggingitemsfordrag:).md)
- [collectionView(_:validateDrop:proposedIndexPath:dropOperation:)](appkit/nscollectionviewdelegate/collectionview(_:validatedrop:proposedindexpath:dropoperation:).md)
- [collectionView(_:acceptDrop:indexPath:dropOperation:)](appkit/nscollectionviewdelegate/collectionview(_:acceptdrop:indexpath:dropoperation:).md)
