Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
- {
- NSMutableArray *allFRCObjects = [[self.frc fetchedObjects] mutableCopy];
- // Grab the item we're moving.
- NSManagedObject *sourceObject = [self.frc objectAtIndexPath:fromIndexPath];
- // Remove the object we're moving from the array.
- [allFRCObjects removeObject:fromIndexPath];
- // Now re-insert it at the destination.
- [allFRCObjects insertObject:sourceObject atIndex:[toIndexPath row]];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement