title: Is it possible to disable the swipe gesture and only make the pan gesture work in a scrollview?
body: <p>I use a <code>UIScrollView</code> to show some images. I find both swipe gesture and pan gesture work. Is it possible to only make pan gesture work at a time?</p>
  <p><strong>I tried this code:</strong></p>
  <pre><code>for gestureRecognizer in scrollView.gestureRecognizers ?? [] {
      if gestureRecognizer is UISwipeGestureRecognizer) {
          gestureRecognizer.isEnabled = false
      }
  }
  </code></pre>
  <p>It doesn't work. I print <code>scrollView.gestureRecognizers!</code>, get the gesture list:</p>
  <blockquote>
  <p>UIScrollViewDelayedTouchesBeganGestureRecognizer</p>
  <p>UIScrollViewPanGestureRecognizer</p>
  <p>_UIDragAutoScrollGestureRecognizer</p>
  <p>UIScrollViewPagingSwipeGestureRecognizer</p>
  </blockquote>
  <p>I tried <code>UIScrollViewPagingSwipeGestureRecognizer</code>:</p>
  <pre><code>if gestureRecognizer is UIScrollViewPagingSwipeGestureRecognizer) {
      gestureRecognizer.isEnabled = false
  }
  </code></pre>
  <p>It says <code>Use of undeclared type 'UIScrollViewPagingSwipeGestureRecognizer'</code>.</p>