Closed iCell closed 9 years ago
Good point, thanks!
@andreamazz Is it possible to disable vertical scrolling when user is swiping on a UITableViewCell?
@NicholasTD07 After swiping on a UITableViewCell:
[self.tableView setScrollEnabled:NO];
And then, after several actions, set it back.
@iCell Could you explain it in detail? For example, where should I call this?
@NicholasTD07 I think I‘ve already explained clearly in my comment.
@iCell I am not saying that I want to disable vertical scrolling at any time, but only when the user is swiping a table view cell to see the action items, like the "Archive" option in "Mail" app which is shown when user swipe horizontally on a UITableViewCell
.
@NicholasTD07 I said after swiping a cell you can use the code to disable the scrolling.
@iCell I want to disable the vertical scrolling when the user is swiping, which starts from when user starts to swipe and ends at when the user stops....
@NicholasTD07 All right, you can detect the state of swipeGesture(or panGesture) in that cell, when the user starts to swipe, the state of the gesture should be UIGestureRecognizerStateBegan, and UIGestureRecognizerStateEnded when the swiping is ended. You can add a panGesture to the cell or maybe there's some ways to get the swiping gesture on the cell.
@iCell I would like to see whether there is a solution that uses UITableViewCell itself without any modification. :)
@NicholasTD07 I suggest you to subclass a UITableViewCell to implement what you want.