Provides the pasteboard writer for the item at the specified index
- macOS 10.7+
The collection view making the request.
The index of the item requiring a pasteboard writer.
The pasteboard writer object to use for managing the item data. Return
nil to prevent the collection view from dragging the item.
The collection view calls this method for each item involved in the drag operation after it has determined that a drag should begin but before the drag operation has started. Your implementation of this method should create and return the pasteboard writer—an object conforming to the
NSPasteboard protocol—to use for providing the item’s data. Using the object you provide, the collection view creates an
NSDragging object for you and configures its
image properties for you using information from the item at the specified index path.
If you implement this method, the collection view does not call the
collection of your delegate or the
dragging method of