Returns an image to use for dragging the specified items.
- macOS 10.11+
The set of
NSIndexobjects corresponding to the items being dragged.
The mouse-down event that began the drag operation.
The offset value to use when positioning the image. On input, the point is
NSZero, which centers the returned image under the mouse. Custom implementations can return a different point that repositions the drag image by the specified offset values.
The image to use for the dragged items.
The default implementation of this method creates an image using the visible portions of the dragged items. The resulting image is a snapshot of the dragged items as they currently appear in the collection view but rendered with additional transparency to indicate they are part of a drag operation. This method also updates the
drag parameter to an appropriate point for dragging the resulting image.
If the delegate implements the
collection method, the collection view method obtains the drag image from that method instead. If the delegate does not implement that method, the collection view uses the image returned by this method.