Hi, I'm supporting deleting rows in a UIView that includes a tableView:
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[self.fetchedResultsController.managedObjectContext
deleteObject:[self.fetchedResultsController
objectAtIndexPath:indexPath]];
NSError *error;
if (![[self.fetchedResultsController managedObjectContext] save:&error]) {
NSLog(@"Unresolved error %@, %@, %@", error, [error userInfo],
[error localizedDescription]);
}
else {NSLog(@"Apparently successful");}
[self.tableView reloadData];
}
}
When I try this out, I get the "Apparently successful" message in the console, but then a SIGABRT in configureCell. It's as though somewhere the object hasn't been deleted, and configureCell is trying to present a missing object. (When I re-run the app, though, the record is gone.)
Any thoughts? Thank you!