Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

Installation

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

pod "ElementDiff"

Releases

  • 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.

About

Animate tableview for view model arrays.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages