Instance Property

registeredDraggedTypes

The array of pasteboard drag types that the view can accept.

Declaration

var registeredDraggedTypes: [NSPasteboard.PasteboardType] { get }

Discussion

This property contains an array of NSString objects, each of which corresponds to a Uniform Type Identifier. The array elements are in no particular order, but the array is guaranteed not to contain duplicate entries. To register your view’s drag types, use the registerForDraggedTypes(_:) method.

See Also

Dragging Operations

func registerForDraggedTypes([NSPasteboard.PasteboardType])

Registers the pasteboard types that the view will accept as the destination of an image-dragging session.

func unregisterDraggedTypes()

Unregisters the view as a possible destination in a dragging session.

func dragFile(String, from: NSRect, slideBack: Bool, event: NSEvent) -> Bool

Initiates a dragging operation from the view, allowing the user to drag a file icon to any application that has window or view objects that accept files.

Deprecated
func dragPromisedFiles(ofTypes: [String], from: NSRect, source: Any, slideBack: Bool, event: NSEvent) -> Bool

Initiates a dragging operation from the view, allowing the user to drag one or more promised files (or directories) into any application that has window or view objects that accept promised file data.

Deprecated
func shouldDelayWindowOrdering(for: NSEvent) -> Bool

Allows the user to drag objects from the view without activating the app or moving the window of the view forward, possibly obscuring the destination.