Note that there are some explanatory texts on larger screens.

plurals
  1. POHandling a touch in a UITableView while its scroll is decelerating
    text
    copied!<p>I have a <code>UITableView</code> inside another <code>UITableview</code>. The first one is placed horizontally, while the second one is a regular <code>UITableView</code>.</p> <p>The horizontal tableview, is a custom class in which I have overloaded the 'gestureRecognizerShouldBegin:' method, this way:</p> <pre><code>- (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)panGestureRecognizer { CGPoint translation = [panGestureRecognizer translationInView:someView]; return fabs(translation.y) &gt; fabs(translation.x); } </code></pre> <p>It basically detects if the user has performed an horizontal or a vertical panning movement over the horizontal tableview. If is vertical, the main tableview scrolls, if it's horizontal, the horizontal tableview scrolls.</p> <p>The problem I'm facing is the following:</p> <ol> <li>I perform a panning touch in the horizontal tableview.</li> <li>The 'x' and 'y' values of the translation var reflect the touch made by the user.</li> <li>The horizontal tableview starts scrolling.</li> <li>The scrolling is decelerating.</li> <li>I perform another panning touch while the scroll is decelerating.</li> <li>The 'x' and 'y' values of the translation var are always 0, no matter how much I move my finger.</li> <li>I put up the finger and then I perform another horizontal panning touch in the horizontal tableview (which has stopped scrolling).</li> <li>The 'x' and 'y' values of the CGPoint returned in the translationInView are correct again, and the scroll movement starts.</li> </ol> <p>So, looks like the 'gestureRecognizerShouldBegin:' method is unable to detect the movement performed by the user while the scroll is moving...</p> <p>I'd appreciate any hints you could give me.</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload