title: UISwipeGestureRecognizer selector not called. Any idea why?
body: <p>I'm using the code below to integrate right/left swipe events to a UIImageView object (called <strong>photo_view</strong>) but it did not work after tests in iphone simulator and device. The methods <strong>handleLeftSwipe</strong> and <strong>handleRightSwipe</strong> below are not even called as logging didn't print anything in the debugger logs as it should. Here is the code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
       [super viewDidLoad];
  
       UISwipeGestureRecognizer *leftSwipeRecognizer = [[UISwipeGestureRecognizer alloc]  initWithTarget:self action:@selector(handleLeftSwipe:)];
       leftSwipeRecognizer.direction = UISwipeGestureRecognizerDirectionLeft;
       leftSwipeRecognizer.numberOfTouchesRequired = 1;
       [photo_view addGestureRecognizer:leftSwipeRecognizer];
       leftSwipeRecognizer.delegate = self;
       [leftSwipeRecognizer release];
  
       UISwipeGestureRecognizer *rightSwipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleRightSwipe:)];
       rightSwipeRecognizer.direction = UISwipeGestureRecognizerDirectionRight;
       rightSwipeRecognizer.numberOfTouchesRequired = 1;
       [photo_view addGestureRecognizer:rightSwipeRecognizer];
       rightSwipeRecognizer.delegate = self;
       [rightSwipeRecognizer release];
  
  }
  
  
  - (void)handleLeftSwipe:(UISwipeGestureRecognizer *)recognizer
  {
       NSLog(@"handleLeftSwipe called");
  }
  
  - (void)handleRightSwipe:(UISwipeGestureRecognizer *)recognizer
  {
       NSLog(@"handleRightSwipe called");
  }
  </code></pre>
  
  <p>Any idea what the reason ?</p>
  
  <p>Thx in advance for helping,</p>
  
  <p>Stephane</p>