Skip to content

Commit

Permalink
Prevent editing & the Delete button when using gestures
Browse files Browse the repository at this point in the history
  • Loading branch information
boctor committed Apr 14, 2011
1 parent 009a600 commit 53fdcf6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SideSwipeTableView/Classes/SideSwipeTableViewController.m
Expand Up @@ -119,6 +119,15 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd
{
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
// If we are using gestures, then don't allow editing
if ([self gestureRecognizersSupported])
return NO;
else
return YES;
}

#pragma mark Adding the side swipe view
- (void) addSwipeViewTo:(UITableViewCell*)cell direction:(UISwipeGestureRecognizerDirection)direction
{
Expand Down

0 comments on commit 53fdcf6

Please sign in to comment.