uitableview

How to update a table cell using diffable UITableView

流过昼夜 提交于 2020-08-26 10:08:09
问题 I'm using the new NSDiffableDataSourceSnapshot and UITableViewDiffableDataSource with a UITableView. I'm having no problems building the table but I'm having problems updating a cell when the data shown in it changes. I haven't found any Apple documentation explaining how to do this. I've tried the following: self.currentSnapshot.reloadItems([Item(identifier: identifier)]) self.dataSource.apply(self.currentSnapshot) I get the following error in reloadItems: Assertion failure in -[_