Post

Replies

Boosts

Views

Activity

Reply to How to reload a single cell when using UITableViewDiffableDataSource
I'm not sure if this will help you in this case, but I noticed that you're creating a new snapshot every time an item is read (apart from the DispatchQueue.main.async code block, which is probably why it's working there). I created a separate update method in my code and it's updating a single section ok. In this "reload" method, try getting the existing snapshot: private func reloadSnapshot(inSection section: Int) { var snapshot = dataSource.snapshot() snapshot.reloadSections([section]) dataSource.apply(snapshot, animatingDifferences: true) }
Topic: UI Frameworks SubTopic: UIKit Tags:
Feb ’21