collectionView(_:draggingSession:willBeginAt:forItemsAt:)
Notifies your delegate that a drag session is about to begin.
Declaration
@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.
See Also
Legacy Collection View Support
collectionView(_:canDragItemsAt:with:)collectionView(_:pasteboardWriterForItemAt:)collectionView(_:writeItemsAt:to:)collectionView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAt:)collectionView(_:draggingImageForItemsAt:with:offset:)collectionView(_:validateDrop:proposedIndex:dropOperation:)collectionView(_:acceptDrop:index:dropOperation:)