Permalink
Browse files

Updated README.

  • Loading branch information...
1 parent 995230c commit f425c8d17196890282c25dd34e6b71d3475e91b4 Ash Furrow committed Sep 16, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 README.md
View
@@ -1,7 +1,13 @@
# `UICollectionView+NSFetchedResultsController`
-This is an example of how to use the new `UICollectionView` with `NSFetchedResultsController`. The trick is to queue the updates made through the `NSFetchedResultsControllerDelegate` until the controller *finishes* its updates.
+This is an example of how to use the new `UICollectionView` with `NSFetchedResultsController`. The trick is to queue the updates made through the `NSFetchedResultsControllerDelegate` until the controller *finishes* its updates. `UICollectionView` doesn't have the same `beginUpdates` and `endUpdates` that `UITableView` has to let it work easily with `NSFetchedResultsController`, so you have to queue them or you get internal consistency runtime exceptions.
# Setup
Clone the repo and look in the `UICollectionViewControllre` subclass. The logic inside the `.m` file shows how to queue updates.
+
+Section updates are stored in `_sectionChanges` while udates to objects within sections are stored in `_objectChanges`. When `controllerDidChangeContent:` is called, these updates are dequeued.
+
+# Credit
+
+Most of the logic for this is taken from [this gist](https://gist.github.com/4440c1cba83318e276bb).

0 comments on commit f425c8d

Please sign in to comment.