Skip to content

Instantly share code, notes, and snippets.



Created Jan 18, 2013
What would you like to do?
Delete confirmation
- (void)delete:(id)sender {
_isDeleting = YES;
[self commitEdit:UITableViewCellEditingStyleDelete];
- (void)commitEdit:(UITableViewCellEditingStyle)editStyle {
[self willTransitionToState:UITableViewCellStateShowingEditControlMask];
if ([[_table dataSource] respondsToSelector:@selector(tableView:commitEditingStyle:forRowAtIndexPath:)]) {
NSIndexPath *ip = [_table indexPathForRowAtPoint:[self center]];
[[_table dataSource] tableView:_table commitEditingStyle:editStyle forRowAtIndexPath:ip];
[self didTransitionToState:UITableViewCellStateShowingEditControlMask];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment