carsonb/PSCollectionView — pull request #12 by abecevello (2012-12-18 16:52:48+00:00)
Title: Feature/incremental insertion deletion

This completely changes how the layout happens for cells. I introduced an idea from UICollectionView (a layout attributes object), which stores the frame and other information about a cell. This is needed because of cell reuse. Ultimately, these changes were made to support incremental insertions and removals from the grid, only recalculating the frame of cells that need to be moved. The default behaviour is to animate cell frame changes, which looks very nice when cells are added and removed. I also added a nice performBatchChanges method to allow multiple insertions and deletions at the same time, avoiding relayout between those changes so the frames don't need to be constantly recalculated.

The only method changes were to the appendView method we added, so I believe the only API changes that other users of PSCollectionView will see are additions. I did remove a bunch of instance variables and private properties that were no longer necessary.

Because this is basically a complete rewrite, it might make more sense to ignore the diff and just look at the source file directly.