Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prevent editing & the Delete button when using gestures

  • Loading branch information...
commit 53fdcf60ddad55f5653105013ff11282c6dd6ee3 1 parent 009a600
@boctor authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 SideSwipeTableView/Classes/SideSwipeTableViewController.m
View
9 SideSwipeTableView/Classes/SideSwipeTableViewController.m
@@ -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
{

0 comments on commit 53fdcf6

Please sign in to comment.
Something went wrong with that request. Please try again.