Returns the index path to for an item when it is at the specified location in the collection view’s bounds.
- iOS 9.0+
- tvOS 9.0+
The previous index path of the item. Use this value to identify the item.
The target point in the collection view’s bounds. Use this value to compute the new index path for the item.
The index path corresponding to the specified location in the collection view.
During interactive movement of an item, this method maps points in the collection view’s bounds rectangle to index paths that correspond to the locations of those points. The default implementation of this method searches for an existing cell at the specified location and returns the index path of that cell. If there are multiple cells at the same location, the method returns the topmost cell—that is, the cell whose
z layout attribute value is greatest.
You can override this method as needed to change how the index path is determined. For example, you might return the index path of the cell that has the lowest
z value instead of the highest. If you override this method, you do not need to call