Skip to content

Instantly share code, notes, and snippets.

@simonnickel
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save simonnickel/9048440 to your computer and use it in GitHub Desktop.

Select an option

Save simonnickel/9048440 to your computer and use it in GitHub Desktop.
- (void)moveRowFromIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
// Reorder example:
id object = [self.itemList objectAtIndex:fromIndexPath.row];
[self.itemList removeObjectAtIndex:fromIndexPath.row];
[self.itemList insertObject:object atIndex:toIndexPath.row];
}
/* if needed
- (void)startedReorderAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"Reordering started");
}
- (void)finishedReorderAtIndexPath:(NSIndexPath *)indexPath; {
NSLog(@"Reordering ended");
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment