designatednerd / DNSSwipeableTableCell

UITableViewCell subclass to add multiple buttons to a swipe-under menu like iOS 7 Mail.
MIT License
175 stars 24 forks source link

Can Swipe Cell While Scrolling #18

Open hbursk opened 9 years ago

hbursk commented 9 years ago

If you begin swiping a cell, you cannot scroll. That's great.

However, if you begin scrolling you can move horizontally which will cause a cell to begin to open and be a bit jumpy in its movement. I tested the same idea against the Mail app, and Apple has it pretty well locked down so there's no horizontal cell interaction while scrolling.

designatednerd commented 9 years ago

@hbursk Thanks - A colleague saw this on another app and there's a solution somewhere around setting delaysContentTouches to NO on your tableview - give that a shot and see if it helps and I'll try to update the sample project and documentation around it.

hbursk commented 9 years ago

Thanks. That didn't seem to do much. My solution was to put:

if ([self.delegate isScrolling])

{

[recognizer setEnabled:NO];

}

at the top of the panReconizerChanged function, and then set [recognizer setEnabled:YES] in the UIGestureRecognizerStateCancelled branch. Setting enabled to NO cancels the recognizer, and that stops it from doing anything. It looks like you had something similar going on before in an older commit but then took it out. Did that cause a problem I haven't found yet?

On Mon, Mar 30, 2015 at 3:53 PM, designatednerd notifications@github.com wrote:

@hbursk https://github.com/hbursk Thanks - A colleague saw this on another app and there's a solution somewhere around setting delaysContentTouches to NO on your tableview - give that a shot and see if it helps and I'll try to update the sample project and documentation around it.

— Reply to this email directly or view it on GitHub https://github.com/designatednerd/DNSSwipeableTableCell/issues/18#issuecomment-87866641 .