UICollectionView reordering: interactive movement or drag and drop?

894 Views Asked by At

As of iOS 9, UICollectionView supports interactive movement via beginInteractiveMovement and its sibling methods. As of iOS 11, it also supports drag and drop, which seems to support movement as well. In iOS 13 beta 4, drag and drop gestures have been combined with UIContextMenuInteraction animations (Twitter link) so you can transition from a context menu to a drag operation, but the same isn't true when reordering via the interactive movement APIs.

Is it better to implement interactive movement of items in a collection view using drag and drop going forward?

1

There are 1 best solutions below

0
On

It is better to migrate to UICollectionViewDragDelegate and UICollectionViewDropDelegate. I recently had a task where I had to combine context menu, reordering (after activation via context menu) and UICollectionViewCompositionalLayout with orthogonal sections. I have to say, that if you use gesture recognizers and interactive movement, it will break scrolling in all orthogonal sections.