Objective-C method ‘controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:’ provided by method ‘controller(:didChangeObject:atIndexPath:forChangeType:newIndexPath:)’ conflicts with optional requirement method ‘controller(:didChangeObject:atIndexPath:forChangeType:newIndexPath:)’ in protocol ‘NSFetchedResultsControllerDelegate’
func controller(controller: NSFetchedResultsController,didChangeObject anObject: NSManagedObject,atIndexPath indexPath: NSIndexPath?,forChangeType type: NSFetchedResultsChangeType,newIndexPath: NSIndexPath?) { if self.collectionView?.window == nil { return } let change = NSMutableDictionary() switch(type) { case .Insert: change[NSNumber(unsignedLong:type.rawValue)] = newIndexPath case .Delete: change[NSNumber(unsignedLong:type.rawValue)] = indexPath case .Update: change[NSNumber(unsignedLong:type.rawValue)] = indexPath case .Move: change[NSNumber(unsignedLong:type.rawValue)] = NSArray(objects: indexPath!,newIndexPath!) default: break } self.objectChanges?.addObject(change) }