DraggableCollectionView icon indicating copy to clipboard operation
DraggableCollectionView copied to clipboard

Use `indexPathForItemAtPoint:` for long press.

Open pbernery opened this issue 10 years ago • 0 comments

handleLongPressGesture: was using indexPathForItemClosestToPoint: method to retrieve the index path of the pressed cell. This works well on layouts that fill the entire collection view space but not on other layouts: in the latter case, the closest cell will be selected whereas this is the one under the finger we want to be selected.

It now uses indexPathForItemAtPoint: instead of indexPathForItemClosestToPoint: to get the touched cell.

An by the way, your lib is awesome: I added dragging in a complex layout in a couple of hours.

pbernery avatar Jun 14 '15 15:06 pbernery