我需要在删除任务之前更新它。我发现当[self.fetchedResultsController objectAtIndexPath:indexPath];
在 NSFetchedResultsChangeDelete 中执行这一行时,应用程序崩溃了。
case NSFetchedResultsChangeDelete:{
Task *task = [self.fetchedResultsController objectAtIndexPath:indexPath];
[self deleleReminderForTask:task];
[self checkForUpdateForTaskForDelete:task];
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
崩溃日志:
CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. *** -[_PFBatchFaultingArray objectAtIndex:]: index (40324416) beyond bounds (1) with userInfo (null)
任何人都可以帮我解决这个问题。