Initializer

init(itemProvider:)

Initializes a new drag item with a specified item provider.

Declaration

init(itemProvider: NSItemProvider)

Parameters

itemProvider

An instance of NSItemProvider conveying the data or file to share during the drag and drop activity.

Return Value

A drag item initialized with the specified item provider.

Discussion

Provide an NSItemProvider object to create a new drag item. The item provider communicates the data that's shared between processes during the drag and drop activity.