Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

Latest commit

 

History

History
17 lines (11 loc) · 619 Bytes

auto_diff.md

File metadata and controls

17 lines (11 loc) · 619 Bytes

AutoDiff

Diffing is a very popular technique in modern mobile apps development. It's easy to convert changes between two lists (inserts, deletes, moves, updates) into a UICollectionView batch update.

To find changes between arrays, elements must be Hashable or Diffable:

let old = Array("abc")
let new = Array("abcd")

let changes = Diff.between(old, and: new)

Provided implementation is based on the Paul Heckel's algorithm.

CollectionViewAdapter uses diffing to animate UICollectionView updates.