This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func controllerWillChangeContent(controller: NSFetchedResultsController) { | |
self.shouldReloadCollectionView = false | |
self.blockOperation = NSBlockOperation() | |
} | |
func controller(controller: NSFetchedResultsController, didChangeSection sectionInfo: NSFetchedResultsSectionInfo, atIndex sectionIndex: Int, forChangeType type: NSFetchedResultsChangeType) { | |
let collectionView = self.collectionView | |
switch type { | |
case NSFetchedResultsChangeType.Insert: | |
self.blockOperation.addExecutionBlock({ |