A composable wrapper arround CollectionDataProvider
defined in Sourcing which calculates a diff when its content changes.
The diff is then used to drive animations inside a Table/CollectioView.
Elements of your data provider need to implement Hashable
let arrayDataProvider = ArrayDataProvider(rows: [1, 2, 3])
let diffedArrayDataProvider = DiffedArrayDataProvider(dataProvider: arrayDataProvider)
// Use diffedArrayDataProvider
- iOS 9.3+
- Xcode 11.0+
- Swift 5.0
SPM is integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
Specify the following in your Package.swift
:
.package(url: "https://github.com/dbsystel/DiffedArrayDataProvider", from: "2.0.0"),
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
Specify the following in your Cartfile
:
github "dbsystel/DiffedArrayDataProvider" ~> 2.0
Feel free to submit a pull request with new features, improvements on tests or documentation and bug fixes. Keep in mind that we welcome code that is well tested and documented.
Lukas Schmidt (Mail, @lightsprint09)
DiffedArrayDataProvider is released under the MIT license. See LICENSE for details.