Instance Method

collectionView(_:draggingSession:endedAt:dragOperation:)

Notifies your delegate that a drag session ended.

Declaration

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

func collectionView(NSCollectionView, canDragItemsAt: Set<IndexPath>, with: NSEvent) -> Bool

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

func collectionView(NSCollectionView, pasteboardWriterForItemAt: IndexPath) -> NSPasteboardWriting?

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

func collectionView(NSCollectionView, writeItemsAt: Set<IndexPath>, to: NSPasteboard) -> Bool

Places the data for the drag operation on the pasteboard.

Deprecated
func collectionView(NSCollectionView, namesOfPromisedFilesDroppedAtDestination: URL, forDraggedItemsAt: Set<IndexPath>) -> [String]

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

Deprecated
func collectionView(NSCollectionView, updateDraggingItemsForDrag: NSDraggingInfo)

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