So I have a tableViewController inside a XLPagerTabStrip view controller, basically a pod which allows me to swipe between child view controllers left and right. The problem is that I want to disable the view controller scroll when the user swipes on a cell on my tableView. In this case I want him to be able to see the delete option, instead of changing the viewController itself. Is this possible? Currently, I see the delete button only if I swipe really, really fast and in all other scenarios, the entire viewController is swiped away.
Asked
Active
Viewed 429 times
1 Answers
0
I don't believe there is any sort of preference property for UIGestures. Instead, I believe the rule is the first gesture added takes precedent. However, in your specific circumstance with XLPagerTabStrip
, you can simply disable scrolling in the interface builder for your 'containerView'
(subclass of UIScrollView
). That solved the problem for me anyway, having my children view controllers' UITableViews
actions appearing correctly.
-
1But I want to use the scroll too, if it is done anywhere except the UITableViewCells :( – JohnVanDijk Aug 02 '16 at 07:01
-
the views will scroll as normal! Just not the swipe gestures for the pager. – modesitt Aug 02 '16 at 07:21
-
Try it out, and if it does not work as you expect it to, can you maybe edit your question and describe the problem a little different? I may not be understanding... – modesitt Aug 02 '16 at 21:40