         willChangeContent(controller)
     }
 
-    @objc func controller(controller: NSFetchedResultsController, didChangeSection sectionInfo: NSFetchedResultsSectionInfo,
-        atIndex sectionIndex: Int, forChangeType type: NSFetchedResultsChangeType) {
+    @objc func controller(controller: NSFetchedResultsController,
+        didChangeSection sectionInfo: NSFetchedResultsSectionInfo,
+        atIndex sectionIndex: Int,
+        forChangeType type: NSFetchedResultsChangeType) {
             didChangeSection(controller, sectionInfo, sectionIndex, type)
     }
 
-    @objc func controller(controller: NSFetchedResultsController, didChangeObject anObject: NSManagedObject, atIndexPath indexPath: NSIndexPath?,
-        forChangeType type: NSFetchedResultsChangeType, newIndexPath: NSIndexPath?) {
+    @objc func controller(controller: NSFetchedResultsController,
+        didChangeObject anObject: NSManagedObject,
+        atIndexPath indexPath: NSIndexPath?,
+        forChangeType type: NSFetchedResultsChangeType,
+        newIndexPath: NSIndexPath?) {
             didChangeObject(controller, anObject, indexPath, type, newIndexPath)
     }
-    
+
     @objc func controllerDidChangeContent(controller: NSFetchedResultsController) {
         didChangeContent(controller)
     }

                    changes[changeType] = [deleteIndexPath]
                }
            case .Update:
                if let i = indexPath {
                    changes[changeType] = [i]
                }
            case .Move:
                if let old = indexPath, new = newIndexPath {


    private func applyObjectChanges() {
        for eachChange in objectChanges {
            for (changeType, indexPaths): (NSFetchedResultsChangeType, [NSIndexPath]) in eachChange {

                switch(changeType) {
                case .Insert: collectionView?.insertItemsAtIndexPaths(indexPaths)
                case .Delete: collectionView?.deleteItemsAtIndexPaths(indexPaths)
                case .Update: collectionView?.reloadItemsAtIndexPaths(indexPaths)
                case .Move:
                    if let first = indexPaths.first, last = indexPaths.last {
                        collectionView?.moveItemAtIndexPath(first, toIndexPath: last)
                    }
                }
