title: Start scrolling horizontal UIScrollView in UITableView only if horizontal scroll is at least 2 times vertical scroll
body: <p>I have a <code>UITableView</code> and each of its cells contains a <code>UIScrollView</code> that can scroll only horizontally.</p>
  
  <p>I would like to trigger the horizontal scroll of the <code>UITableViewCell</code> only if for example the velocity on x is at least 2 times faster than the velocity on y. If it's not the case, then the <code>UITableView</code> can normally scroll vertically.</p>
  
  <p>So far I have tried to subclass my <code>UITableView</code> and override <code>gestureRecognizerShouldBegin</code>. But it didn't work as I realised the <code>gestureRecognizerShouldBegin</code> of my horizontal <code>UIScrollView</code> (the one of top of each cell) was called first.</p>
  
  <p>So I decided to override <code>gestureRecognizerShouldBegin</code> on my horizontal <code>UIScrollView</code>:</p>
  
  <pre><code>override func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -&gt; Bool {
      if gestureRecognizer is UIPanGestureRecognizer {
          let velocity = (gestureRecognizer as! UIPanGestureRecognizer).velocityInView(tableView)
  
          return fabs(velocity.x) &gt; fabs(velocity.y) * 2
      }
  
      return super.gestureRecognizerShouldBegin(gestureRecognizer)
  }
  </code></pre>
  
  <p>The problem then is that is I return <code>false</code> then the UITableView doesn't scroll (<code>gestureRecognizerShouldBegin</code> is not even called).</p>
  
  <p>How can I fix this? Why does it behave like this?</p>