collectionView(_:draggingSession:endedAt:dragOperation:)
Notifies your delegate that a drag session ended.
Declaration
@MainActor optional func collectionView(_ collectionView: NSCollectionView, draggingSession session: NSDraggingSession, endedAt screenPoint: NSPoint, dragOperation operation: NSDragOperation)Parameters
- collectionView:
The collection view notifying your delegate object.
- session:
The dragging session that ended.
- screenPoint:
The end point (in screen coordinates) for the drag operation.
- operation:
The operation that was performed. Use this value to determine how the operation ended. For example, for content that was dragged to the trash, the operation type would be Delete.
Discussion
You can use this method to perform tasks related to the ending of a drag session.
See Also
Drag and Drop Support
Supporting Collection View Drag and Drop Through File PromisescollectionView(_:canDragItemsAt:with:)collectionView(_:pasteboardWriterForItemAt:)collectionView(_:writeItemsAt:to:)collectionView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAt:)collectionView(_:draggingImageForItemsAt:with:offset:)collectionView(_:draggingSession:willBeginAt:forItemsAt:)collectionView(_:updateDraggingItemsForDrag:)collectionView(_:validateDrop:proposedIndexPath:dropOperation:)collectionView(_:acceptDrop:indexPath:dropOperation:)