Dwifft is a small Swift library that tells you what the "diff" is between two collections, namely, the series of "edit operations" required to turn one into the other. It also comes with UIKit bindings, to automatically, animatedly keep a UITableView/UICollectionView in sync with a piece of data by making the necessary row/section insertion/deletion calls for you as the data changes. Dwifft is a Swift library that does two things. The first thing sounds interesting but perhaps only abstractly useful, and the other thing is a very concretely useful thing based off the first thing. It can help you build a substantially better user experience if you have table/collection views with dynamic content in your app. There is some non-trivial index math inside of this diff algorithm that is easy to screw up. Dwifft has 100% test coverage on all of its core algorithms.
Features
- Dwifft is fast
- It almost certainly won't be the bottleneck in your UI code
- Dwifft believes in the unix philosophy of small, easily-composed tools
- It can actually achieve nice goals like 100% test and documentation coverage
- Dwifft has 100% test coverage on all of its core algorithms
- Build a substantially better user experience if you have table/collection views with dynamic content in your app