I have a UITableView with normal vertical scrolling.
I want to add a UISwipeGestureRecnogiser to it (or somewhere connected in the view hierarchy).
I've done this, but the vertical tolerance on my gesture recogniser is pretty small. So I have to get my horizontal swipe p开发者_Python百科retty straight, otherwise the UITableView takes over and scrolls vertically. This is pretty annoying for the user.
Has anyone got any suggestions on how to better handle this? Maybe putting a UIView on top of my table view that handles the gesture, but if it fails - somehow pass the event to my table View.....
I ended creating my own gesture recogniser - following the example from the event handling guide for iOS.
I had more control over vertical tolerance using the old touchesMove and touchesBegan.
It still wasn't perfect, but it was a lot better and after testing on a few people, I could see there the swiping was less error prone.
精彩评论