talira

IGListKit

A data-driven UICollectionView framework for building fast and flexible lists

open sourceMITfree

IGListKit is Instagram's framework for building lists on top of UICollectionView: you give it your data, and its diffing algorithm works out the inserts, deletes and moves, so you never call performBatchUpdates or reloadData yourself. Lists are built from reusable section controllers, can mix several data types, and the diffing is decoupled and customisable per model. It is written in Objective-C with full Swift interoperability, runs on iOS and tvOS (macOS for the diffing components only), and Instagram uses its main branch in the Instagram app.

Problems it solves

  • update a UICollectionView without calling reloadData or performBatchUpdates
  • build an iOS feed that mixes several kinds of cells
  • diff two arrays of models to animate list changes on iOS

Features

  • automatic diffing of collection view updates
  • reusable section controllers
  • multiple data types in one list
  • customisable diffing per model
  • CocoaPods, Carthage and Swift Package Manager

Limitations

  • On macOS only the diffing algorithm components are supported.1