Is there any way that I can make UICollectionViewDiffableDataSource stop scrolling collection view while we apply snapshot?
I am using this library: https://github.com/ra1028/DiffableDataSources
I have a situation where I want to keep the collection view scroll position while I load more data using UIRefreshControl.
var snapshot = DiffableDataSourceSnapshot<ChatKitDataSourceSection, ChatKitMessage>()
snapshot.deleteAllItems()
snapshot.appendSections(self.items)
self.items.forEach { section in
snapshot.appendItems(section.rowItems, toSection: section)
}
self.apply(snapshot, animatingDifferences: true, completion: completion)
That's how I am updating the snapshot every time I load more data.