Creates and returns a drag image to represent the specified items during a drag.
- macOS 10.11+
The collection view making the request.
The index paths of the items being dragged.
The mouse-down event that began the drag operation. You can use the mouse location when determining what value to return in the
The offset value to use when positioning the image. On input, the point is
NSZero, which centers the returned image under the mouse. Your method can return a different point that repositions the drag image by the specified offset values.
The image to use for the dragged items.
Your implementation of this method should create an appropriate image to use during the drag operation. The collection view places the center of your image at the current mouse location. Update the value in the
drag parameter to shift the position of your image by the specified amount.
If you do not implement this method, the collection view uses the drag image returned by the
dragging method instead.