You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[error] error: Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. -[UICollectionViewUpdateItem _isCell]: unrecognized selector sent to instance 0x600000226a80 with userInfo (null)
CoreData: error: Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. -[UICollectionViewUpdateItem _isCell]: unrecognized selector sent to instance 0x600000226a80 with userInfo (null)
Context
When the some data come in modifications section in method update (deletions: [Int], insertions: [(index: Int, element: T)], modifications: [(index: Int, element: T)])
Proposal
I think that the problem in CoreDataObservable in this code
// MARK: - NSFetchedResultsControllerDelegate
public func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChange anObject: Any, at indexPath: IndexPath?, for type: NSFetchedResultsChangeType, newIndexPath: IndexPath?) {
switch type {
case .delete:
self.batchChanges.append(.delete(indexPath![0], anObject as! T))
case .insert:
self.batchChanges.append(.insert(newIndexPath![0], anObject as! T))
case .update:
self.batchChanges.append(.update(indexPath![0], anObject as! T))
default: break
}
}
You use the index 0, which is the index of the section and not of the cell
The text was updated successfully, but these errors were encountered:
What
I got an error when using
CoreDataObservable
Context
When the some data come in modifications section in method
update (deletions: [Int], insertions: [(index: Int, element: T)], modifications: [(index: Int, element: T)])
Proposal
I think that the problem in
CoreDataObservable
in this codeYou use the index 0, which is the index of the section and not of the cell
The text was updated successfully, but these errors were encountered: