Reputation: 16051
I want to move the items in a UICollectionView
in the same way that you would move books in iBooks or icons on the home screen. I tried LXReorderableCollectionViewFlowLayout
and DraggableCollectionView
, but both of them show an object still in each cell as it's being dragged. Is there another way that I can do this that will work properly?
Upvotes: 0
Views: 1050
Reputation: 14128
I think I understand what you're asking. On the iOS springboard you can move an item to the relative position and a move will still be triggered. With LXReorderableCollectionViewFlowLayout a move is triggered by moving a cell over another. It's very "exact".
DraggableCollectionView also used to be this way, but it now uses the closest cell, just like the iOS sprintboard. It accomplishes this by pretending each section has +1 cells, and uses the distance formula to get the closest index.
(I'm the author of the DraggableCollectionView, and I've also contributed to the LXReorderableCollectionViewFlowLayout).
Upvotes: 1