0
votes

I want my table view cell to show the Delete bar on the right side when the user swipes. However, the table view is in a UIScrollView, and although it is at the far right side, and swiping left does not move the scroll view, the table view cell makes it difficult to edit.

In order to trigger the swipe for editing, I must swipe very fast and in a perfectly horizontal line. The speed required is far more than you can expect users to even want to do, and would not be expected at all from a user's perspective.

I believe the scroll view is the cause, but I cannot be certain. No gesture recognizer is present.

How can I prevent the scroll view from mucking up this experience?

2
Why is your table view in scroll view? A table view is a scroll view. - rmaddy
@rmaddy The scroll view is a horizontal paging view, similar to the Snapchat app. This table is in the spot all the way on the right. - erdekhayser
Would you mind giving a screenshot? - Yuchen

2 Answers

0
votes

Putting a tableView or webView in a scrollView is not advised, because of the exact problem you are having. Your best bet is to find a way around putting it in a scrollView. Other than modifying your tableView to not be in the scrollView, you might try moving your tableView to the front. [superView bringSubviewToFront:tableView]; hope this helps.

0
votes

You could try using the gesture recognizer delegate methods for this. I don't have Xcode in front of me, but if you use gestureRecognizer:shouldRequireFailureOfGestureRecognizer: and just fail the scrollView's swiping gesture if the gesture recognized is that of the swiping of the table view cell. Check UIGestureRecognizerDelegate in the docs.