I added the code below to the collectionview using UICollectionViewDiffableDataSource.
However, I can not drag the cells. (mysteriously, I can drag cells on Mac Catalyst)
What is missing?
However, I can not drag the cells. (mysteriously, I can drag cells on Mac Catalyst)
What is missing?
Code Block swift dataSource.reorderingHandlers.canReorderItem = { item in return true } dataSource.reorderingHandlers.didReorder = { [weak self] transaction in guard let self = self else { return } if let updatedBackingStore = self.backingStore.applying(transaction.difference) { self.backingStore = updatedBackingStore } }