Closed sisto closed 10 years ago
are you sure that you enabled editing mode for your tableView?
[cell setUserInteractionEnabled:TRUE];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
and
(BOOL)tableView:(UITableView )tableView canEditRowAtIndexPath:(NSIndexPath )indexPath { return YES;}
without AMSLIDEMenu on swipe left appear RED delete button
try this: In your vc :
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.mainSlideMenu.panGesture.enabled = NO;
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
self.mainSlideMenu.panGesture.enabled = YES;
}
//...
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
}
I can't seem to edit my UITableView with AMSlidemenu. Tried entering the code above and this did not work. What am I missing.
I'm using iOS 8, I was with the same problem. I solved that, I'm using the following code. I don't know if this affect anything else, but It's working fine for me to edit the UITableViewCell.
steps:
AMSlideMenuMainViewController.m
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
if (directionIsLeft) {
// My CODE #### Enable edit cell
self.panGesture.enabled = NO;
self.panGesture.enabled = YES;
// end
if (self.rightMenu) {
return NO;
} else {
return YES;
}
}
Thank you so much ! @jhoneylopes :)
@jhoneylopes :)
Thanks man, I was pulling my hair out of my skull.
in a view i have a iutableview but don't work swipe on left to delete row.
Any idea?
thanks
Sabino