Created
July 22, 2012 13:02
-
-
Save joaofranca/3159585 to your computer and use it in GitHub Desktop.
gist 4: iOS - Customize UITableViewCell delete/move overlay views while editing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// update datasource after moving | |
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { | |
// you should correct the data source order here to reflect the row moving | |
// it should be somethig like: | |
NSString * tmp = [sourceArray objectAtIndex:fromIndexPath.row]; | |
[sourceArray removeObjectAtIndex:fromIndexPath.row]; | |
[sourceArray insertObject:tmp atIndex:toIndexPath.row]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment