title: how to handle 1 to 3 fingers swipe gesture in iOS
body: <p>I use the following code to handle 1 finger swipe in my code:</p>
  
  <pre><code>UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleViewsSwipe:)];
      [swipe setDirection:UISwipeGestureRecognizerDirectionLeft];
      [swipe setDelaysTouchesBegan:YES];
      [[self view] addGestureRecognizer:swipe];
  </code></pre>
  
  <p>I know i can add the following line to make it handle 2 fingers swipe:</p>
  
  <pre><code> [swipe setNumberOfTouchesRequired:2];
  </code></pre>
  
  <p>However when I add the above code 1 finger swipe is no longer detected since the number of touches required is now 2.  What can I do to make my code work for 1, 2 or 3 fingers swipe?</p>
  
  <p>I tried using the following code but this doesn't do what I want to do.</p>
  
  <pre><code>UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleViewsSwipe:)];
      [panRecognizer setMinimumNumberOfTouches:1];
      [panRecognizer setMaximumNumberOfTouches:3];
      [panRecognizer setDelaysTouchesBegan:YES];
      [[self view] addGestureRecognizer:panRecognizer];
      [panRecognizer release];
  </code></pre>
  
  <p>Thank you.</p>