Instance Property


Returns the pasteboard reader or writer object dependent on the context of where this dragging item is used .


var item: Any { get }


When you create an NSDraggingItem instance, item is the pasteboardWriter passed to init(pasteboardWriter:).

However, when enumerating dragging items using the NSDraggingSession method enumerateDraggingItems(options:for:classes:searchOptions:using:) or the NSDraggingInfo method enumerateDraggingItems(options:for:classes:searchOptions:using:), item is not the original pasteboard reader or writer instance. It is an instance of one of the classes provided to the enumeration method’s classArray parameter.

See Also

Drag Image Components

var imageComponents: [NSDraggingImageComponent]?

Returns an array of dragging image components that are used to create the drag image.

var imageComponentsProvider: (() -> [NSDraggingImageComponent])?

An array of blocks that provide the dragging image components.