1

How to restrict multiple cell edit(swipe) in SWTableViewCell as shown in the image below. As when one cell is swiped and other cell is being swiping, the previous cell should closed itself.

Library source: https://github.com/CEWendel/SWTableViewCell

enter image description here

Bhargav Soni
  • 1,067
  • 1
  • 9
  • 22

1 Answers1

0

This should work :

cell.contentView.exclusiveTouch = YES;
cell.exclusiveTouch = YES;  

You also need to include this delegate function :

- (BOOL)swipeableTableViewCellShouldHideUtilityButtonsOnSwipe:(SWTableViewCell *)cell
{
    return YES;
}  

Don't forget to set the cell's delegate in cellForRowAtIndexPath :

cell.delegate = self;
Nitish
  • 13,845
  • 28
  • 135
  • 263