dragOperation(for:type:)
Returns the type of drag operation that should be performed if the image were released now.
Declaration
func dragOperation(for dragInfo: any NSDraggingInfo, type: NSPasteboard.PasteboardType) -> NSDragOperationParameters
- dragInfo:
The drag information.
- type:
The pasteboard type that will be read from the dragging pasteboard.
Return Value
The drag operation that should be performed if the image were released now.
Discussion
The returned value should be one of the following:
Option | Meaning |
|---|---|
| The data represented by the image will be copied. |
| The data will be shared. |
| The operation will be defined by the destination. |
| The operation is negotiated privately between the source and the destination. |
If none of the operations is appropriate, this method should return NSDragOperationNone.
This method is called repeatedly from draggingEntered(_:) and draggingUpdated(_:) as the user drags the image.