The NSDraggingImageComponent class represents a single object in a dragging item.


An array of NSDraggingImageComponent instances are composited together to create the dragging image for an NSDraggingItem. NSDraggingImageComponent instances can simply be considered as named images with a location used by an NSDraggingItem instance.

See NSDraggingItem for more information.


Creating a Dragging Image Component

init(key: String)

Initializes and returns a dragging image component with the specified key.

Dragging Image Component

var key: String

The unique name of this image component instance.

Dragging Image Contents

var contents: Any?

An object providing the image contents of the component.

var frame: NSRect

The coordinate space is the bounds of the parent dragging item.


NSDragImage Component Keys

These constants are used by the init(key:), draggingImageComponentWithKey: methods and the key property.


Inherits From

Conforms To