iOS infinitely deeply nested TableView/UIGestureRecognizer view tree AND iPAD requires 2 finger scrolling on a tableview

299 Views Asked by At

I've been trying to solve this problem for few days now and google/SO has not helped me.

When viewing a tableview from an iPAD, it requires 2 finger pan gesture to scroll the tableview (only if the user interaction of the cells is enabled)

A friend of mine suggested that I probably have 2 nested gesture recognizers which could possibly result to this behaviour. However, this behaviour is not present on iPhone.

I have 2 different tableviews on my application and only the one, which has user interaction enabled behaves like this. I started debugging and I found something interesting.

Here is a screenshot of the viewtree of the tableview that doesnt require 2 fingers to pan. The "broken" tableview has a similar viewtree. It seems that the tree is infinite and I wonder why this doesnt result to crash. Could someone confirm, this is the expected behaviour?

TableView GestureRecognizer structure

Did anyone stumble across the forced 2 finger pan gesture on tableviews on iPAD. This doesn't seem to be the default behaviour on iOS native applications.

Thank you very much for all the answers!

Edit 1:

-The 2 finger panning is forced only on dynamic prototype cells, but not in a tableView with static cells. I've been checking my tableViews and the cell "constructors", but I'm not doing anything gesture related there.

-self.tableView.panGestureRecognizer.minimumNumberOfTouches == 1

2

There are 2 best solutions below

0
On BEST ANSWER

I found the answer.

I was showing an alertView on: didHighlightRowAtIndexPath.

Changing this to: didSelectRowAtIndexPath fixed the problem and enables me to scroll with 1 finger now.

1
On

Check whether your scrollView's panGestureRecognizer.minimumNumberOfTouches has somehow been set to 2, and if it has, check who did that.