Animate tableview for view model arrays.
Swift Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example
Sources
.gitignore
ElementDiff.podspec
LICENSE
README.md

README.md

ElementDiff Version License Platform


Compute differences between two sequences of elements.

These can be passed to updateSection extensions to animate transitions.

Example

// Update self.items array of view models
let previous: [ViewModel] = self.items
self.items = model.currentViewModels()
let diff = previous.diff(self.items)

// Animate changes to view models array
self.tableView.beginUpdates()
self.tableView.updateSection(0, diff: diff)
self.tableView.endUpdates()

Example

Installation

ElementDiff is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ElementDiff"

Releases

  • 0.6.0 - 2018-04-23 - Throw error for non-unique ids
  • 0.5.0 - 2017-06-23 - Add fatalError for non-unique ids
  • 0.4.0 - 2016-12-06 - Swift 3 support
  • 0.3.0 - 2016-09-03 - Remove reloadRowsAtIndexPaths
  • 0.2.1 - 2016-03-04 - Make ElementDiff struct fields vars
  • 0.2.0 - 2015-12-22 - Allow for using custom identifier
  • 0.1.0 - 2015-12-12 - Initial public release
  • 0.0.0 - 2015-07-29 - Initial private version for project at Q42

License & Credits

ElementDiff is written by Tom Lokhorst of Q42 and available under the MIT license, so fee free to use it in commercial and non-commercial projects.