title: UIGestureRecognizer sample code
body: <p>I cannot figure out what is wrong. Below is my code, and it calls the delegate methods once then stops.</p>
  
  <p>What should I do? I haven;t been able to find the sample code that uses these delegate methods. All I've found were gesture recognizers for swipes and taps, using different delegates. </p>
  
  <p>Code so far:</p>
  
  <pre><code>-(void)initTouchesRecognizer{
  
      DLog(@"");
  
      recognizer = [[UIGestureRecognizer alloc] init];
  
      [self addGestureRecognizer:recognizer];
  
  }
  
  
  -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  {
  
  
      DLog(@"");
  
  
      NSSet *allTouches = [event allTouches];
      for (UITouch *touch in allTouches)
      {
  
  
      }
  
  }
  
  
  
  
  -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
  {
      UITouch *touch = [[event allTouches] anyObject];
      CGPoint location = [touch locationInView:touch.view];
  
  }
  
  
  
  
  - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
         DLog(@"");
  
  }
  
  
  
  - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
      [self touchesEnded:touches withEvent:event];
  }
  </code></pre>
  
  <p>I call initTouchesRecognizer from initwithrect for my image view. </p>
  
  <p>What am i doing fundamentally wrong?</p>