README.md

PHFArrayComparator

Easily animate table changes. This animation shows two table views side by
side, the left one does not use animations while the right one does.

This little class is intended to be used with UITableView and other collection
like views. It's purpose is to facilitate the smooth update of displayed data.
It does that by telling you what is gone, what moved, and what is new in the
data. These can then be directly translated to table view methods that insert,
move, and delete rows or sections.

Installation

If you can't use CocoaPods for some reason (you really should though, it's the
cool kid on the block), then grab the PHFRefreshControl.{h,m} files and put it
in your project. The code uses ARC, so make sure to turn that on for this file
if you're not already using ARC.

Usage

PHFArrayComparatorDeletesKey: An array of arrays containing two NSNumbers
indicating index and count of items that were removed from the old array, e.g.
[2, 3] means 3 items were removed at index 2.

PHFArrayComparatorMovesKey: An array of arrays containing two NSNumbers
indicating the old and new index of a persisted item (i.e. an item present) in
terms of the old array that needed to be swapped with another persited item in
order to respect the new item order.

PHFArrayComparatorInsertsKey: An array of arrays containing two NSNumbers
indicating index and count of items that were inserted in the new array.