Say I have a UICollectionView using a UICollectionViewFlowLayout and the following format:
1 2 3 4 5 6 7 8 9
I touch cell 9 and drag it over ce
Swift code:
self.collectionView.performBatchUpdates({ self.collectionView.moveItem(at: selectedIndexPath, to: targetIndexPath) self.collectionView.moveItem(at: targetIndexPath, to: selectedIndexPath) }, completion: nil)