Contents

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 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

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