title: UISwipeGestureRecognizer only one direction working
body: <p>So Im making a page with pageControl (it's a page with multiple views with dots indicating which page you're in), my code looks like the following in <code>viewDidLoad</code>:</p>
  
  <pre><code>UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipeAction:)];
  UIView *temp = [[UIView alloc]initWithFrame:self.view.frame];
  temp.backgroundColor = [UIColor clearColor];
  [temp addGestureRecognizer:swipe];
  [self.view addSubview:temp];
  </code></pre>
  
  <p>And in the swipeAction selector I have:</p>
  
  <pre><code>- (void)swipeAction: (UISwipeGestureRecognizer *)sender{
      NSLog(@"Swipe action called");
      if (sender.direction == UISwipeGestureRecognizerDirectionLeft) {
          //Do Something
      }
      else if (sender.direction == UISwipeGestureRecognizerDirectionRight){
          //Do Something Else
      }
  }
  </code></pre>
  
  <p>To my surprise, this method only works when you swipe to the right (i.e. the <code>else if</code> block gets called).  When you swipe left, the <code>swipeAction</code> doesn't even get called!  This is strange, why does this happen and how should I change my code?  Any reply is appreciated.  Thanks a lot!</p>