Instance Method

registerForDraggedTypes:

Registers a give set of pasteboard types as the pasteboard types the window will accept as the destination of an image-dragging session.

Declaration

- (void)registerForDraggedTypes:(NSArray<NSPasteboardType> *)newTypes;

Parameters

newTypes

An array of the pasteboard types the window will accept as the destination of an image-dragging session.

Discussion

Registering an NSWindow object for dragged types automatically makes it a candidate destination object for a dragging session. NSWindow has a default implementation for many of the methods in the NSDraggingDestination protocol. The default implementation forwards each message to the delegate if the delegate responds to the selector of the message. The messages forwarded this way are draggingEntered:, draggingUpdated:, draggingExited:, prepareForDragOperation:, performDragOperation:, and concludeDragOperation:.

See Also

Dragging Items

- unregisterDraggedTypes

Unregisters the window as a possible destination for dragging operations.