A Swift library for calculating diffs between collections with UIKit bindings for automatic table/collection view updates.
Dwifft is a Swift library that calculates differences between two collections using the Longest Common Subsequence algorithm. It provides the exact edit operations needed to transform one collection into another, with built-in UIKit bindings that automatically animate UITableView and UICollectionView updates when underlying data changes.
iOS developers building apps with UITableView or UICollectionView that display dynamic, changing data and want smooth animated transitions without manual index path calculations.
Developers choose Dwifft because it handles the complex index math required for reliable diffing with 100% test coverage, provides automatic animated UI updates, and is significantly faster than naïve implementations while maintaining a small, flexible codebase.
Swift Diff
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides UIKit bindings that automatically animate UITableView and UICollectionView updates when data changes, eliminating manual index path calculations.
Features 100% test coverage with SwiftCheck property-based testing, ensuring correctness across exhaustive edge cases as stated in the README.
Significantly faster than naïve implementations with minimal UI overhead, as highlighted in the README's key features.
Efficiently handles section insertions/deletions and cross-section row operations, a key improvement since version 0.6 for complex table views.
Limited to UITableView and UICollectionView; no support for SwiftUI or other UI frameworks, which restricts its use in modern iOS development.
Uses Longest Common Subsequence for diffing, which may not optimally handle item moves (treating them as delete+insert) compared to more advanced algorithms like those in IGListKit.
Requires developers to wire up diff calculators to their views, which can add complexity compared to more integrated solutions with automatic data binding.