Hi everyone,
I’m working on an iOS app using both UITableViewDiffableDataSource and SwiftUI, and I’m facing two separate but puzzling issues:
-
UITableViewDiffableDataSource Not Reusing Cells on first applying after initial Snapshot. After applying first time it is working as expected from second time.
-
SwiftUI View’s inside UITableViewCell onDisappear Not Triggering the on first changes of snapshot after initial snapshot.
With normal UITableView it is working fine.
Issue causing - it is causing player & cells to retain memory extensively
Sample gist code for reproducing with diffable (DiffableTableViewExampleViewController) and working fine without diffable (RegularTableViewExampleViewController)
https://gist.github.com/SURYAKANTSHARMA/d83fa9e7e0de309e27485100ba5aed17 Any insights or suggestions for these issues would be greatly appreciated!
Thanks in advance!