I have a UITableView, for whom some (not all) UITableViewCells contain their own UITableView.
The default behavior I'm finding is, when trying to single-tap scroll (UIScrollViewPanGestureRecognizer) the outermost table, scrolling works just fine, but only when the tap begins on a cell not containing a nested UITableView. When the cell does contain a nested UITableView, that inner table's PanGestureRecognizer is invoked. This behavior is understandable and expected.
My desire is to disable all scrolling on the inner tables, and have any pan gestures that begin on them instead trigger/invoke scrolling on the outer table.
I have researched and tried several solutions, but without success.
Disabling all interaction in the nested cell isn't an option, because I need the ability to tap-select or swipe-delete cells within the nested table.
I was able to find and remove the inner table's UIScrollViewPanGestureRecognizer. This successfully disabled scrolling for the inner table. However, I couldn't get the outer table's UIScrollViewPangestureRecognizer to be invoked. Instead my outer table basically had "dead spots" (the cells having a nested table) where scrolling on the outer table wouldn't take place.
Everything I've read about the view hierarchy and hit-testing suggests that the above solution should simply work: the UITouch is wrapped in a UIEvent, and all possible receivers in the view hierarchy are thus queried. Strangely enough, from the debugger, my view hierarchy appears to be severed at the point of the inner UITableView. That is, for the UITableViewCell in question, its superview chain only leads to nil, not to the outermost table. Yet, using the Reveal App (www.revealapp.com), I have confirmed that my view hierarchy is indeed connected (which makes sense, otherwise the inner table wouldn't be rendering).
Lastly, I tried this code:
[innerTable.panGestureRecognizer requireGestureRecognizerToFail:outerTable.panGestureRecognizer];
Based on my references, this should do exactly what I'm seeking here -- the inner table won't capture the pan-gesture unless the outer table defers. But this code has no effect.
Any help you can provide is most appreciated -- this has been a confounding UI mystery for many days now!