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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.