Instance Method

collectionView:draggingSession:willBeginAtPoint:forItemsAtIndexPaths:

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

Declaration

- (void)collectionView:(NSCollectionView *)collectionView draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint forItemsAtIndexPaths:(NSSet<NSIndexPath *> *)indexPaths;

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

- collectionView:canDragItemsAtIndexPaths:withEvent:

Returns a Boolean indicating whether a drag operation involving the specified items can begin.

- collectionView:pasteboardWriterForItemAtIndexPath:

Provides the pasteboard writer for the item at the specified index path.

- collectionView:writeItemsAtIndexPaths:toPasteboard:

Places the data for the drag operation on the pasteboard.

Deprecated
- collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexPaths:

Returns the names of the promised files that you created for a drag operation.

Deprecated
- collectionView:draggingImageForItemsAtIndexPaths:withEvent:offset:

Creates and returns a drag image to represent the specified items during a drag.

- collectionView:draggingSession:endedAtPoint:dragOperation:

Notifies your delegate that a drag session ended.

- collectionView:updateDraggingItemsForDrag:

Asks your delegate to update the dragging items during a drag operation.

- collectionView:validateDrop:proposedIndexPath:dropOperation:

Validates whether a drop operation is possible at the specified location.

- collectionView:acceptDrop:indexPath:dropOperation:

Incorporates the dropped content into the collection view.