Contents

init(itemProvider:)

Initializes a new drag item with a specified item provider.

Declaration

init(itemProvider: NSItemProvider)

Parameters

  • itemProvider:

    An instance of Nsitemprovider that conveys the data or file to share during the drag-and-drop activity.

Return Value

A drag item that the system initializes with the specified item provider.

Discussion

Provide an NSItemProvider object to create a new drag item. The item provider communicates the data that the drag-and-drop activity shares between processes.