title: Paging UIScrollView with two-finger pan and zoom
body: <p>The test case is easily reproduced: download Apple's <a href="http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html" rel="nofollow">PhotoScroller</a> sample app, and try to adapt it so that panning (both around a zoomed image, and between each image) only works with two fingers.</p>
  
  <p>Setting the <code>panGestureRecognizer</code> for both the <code>pagingScrollView</code> and the <code>imageScrollView</code> to only accept a min &amp; max of 2 touches seems like a good place to start, however it doesn't work. It lets you scroll around an image with two fingers just fine*, however paging then doesn't work.</p>
  
  <p>I've tried so many combinations of settings and custom gesture recognizers, and I'm a bit stumped. Is a custom scroll view subclass going to be of any use, or can I somehow manipulate the scroll view delegate methods to make it work?
  <br>
  <br>
  *<em>EDIT: Actually, it doesn't scroll fine in this situation. The view no longer glides smoothly as with a single touch...</em></p>
  
  <p><em>UPDATE: I'm still struggling with this one. I would appreciate some input from somebody who has played around with <code>UIGestureRecognizer</code>s and <code>UIScrollView</code>s.</em></p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Setting the <code>ImageScrollView</code> class to only accept two touches:</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame
  {
      // ...
      // Template code
      // ...
  
      [self.panGestureRecognizer setMinimumNumberOfTouches:2];
      [self.panGestureRecognizer setMaximumNumberOfTouches:2];
  }
  </code></pre>
  
  <p>Setting <code>PhotoViewController</code>'s <code>pagingScrollView</code> to only accept two touches:</p>
  
  <pre><code>- (void)loadView
  {
      // ...
      // Template code
      // ...
  
      [pagingScrollView.panGestureRecognizer setMinimumNumberOfTouches:2];
      [pagingScrollView.panGestureRecognizer setMaximumNumberOfTouches:2];
  }
  </code></pre>
  
  <p>These modifications are made directly on top of the PhotoScroller sample app. I would expect these simple changes to work for two-finger interaction, however the side-effects are odd (as explained above).</p>