Instance Method

collectionView:updateDraggingItemsForDrag:

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

Declaration

- (void)collectionView:(NSCollectionView *)collectionView updateDraggingItemsForDrag:(id<NSDraggingInfo>)draggingInfo;

Parameters

collectionView

The collection view asking you to update the dragging items.

draggingInfo

The current information for the drag operation. Use this object to iterate over the dragging items.

Discussion

You can use this method to update the current drag items while a drag is in progress. Updating the drag items is optional, but you might use this method to change the image for an item. For example, you might change the image when the mouse hovers over a particular part of the collection view. Use the enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock: method of the draggingInfo parameter to iterate over the drag items and update them as appropriate.

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:willBeginAtPoint:forItemsAtIndexPaths:

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

- collectionView:draggingSession:endedAtPoint:dragOperation:

Notifies your delegate that a drag session ended.

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