Skip to content

Instantly share code, notes, and snippets.

@dob
Created October 1, 2009 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dob/198694 to your computer and use it in GitHub Desktop.
Save dob/198694 to your computer and use it in GitHub Desktop.
case NSFetchedResultsChangeMove:
// Move the row
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
// Delete the section if it's now empty
if ([[controller sections] count] == 1){
[self.tableView deleteSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationFade];
}
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment