Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created June 20, 2014 15:20
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 mikeabdullah/dbdaeef1db48551265a4 to your computer and use it in GitHub Desktop.
Save mikeabdullah/dbdaeef1db48551265a4 to your computer and use it in GitHub Desktop.
Detecting if in editing mode, or just editing a single table row
- (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath {
_isEditingIndividualRow = YES;
[super tableView:tableView willBeginEditingRowAtIndexPath:indexPath];
}
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
BOOL inEditingMode = editing && !_isEditingIndividualRow;
if (inEditingMode) // ...set up toolbar accordingly
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment