Returns custom information about how to display the item at the specified location during the drag.
- iOS 11.0+
The collection view from which the drag operation originated.
The index path of the item being dragged.
Drag parameters that indicate how to display the cell's content during a drag.
Use this method to customize the appearance of the item during drags. If you do not implement this method or if you implement it and return
nil, the collection view uses the cell's visible bounds to create the preview.
In your implementation, create a
UIDrag object and update the preview information for the specified item. Use the parameters to specify the portion of the cell that you want to be included in the drag preview or to change the background color drawn beneath your cell.