title: Simultaneous use of touch down and touch up gesture recognizers
body: <p>I'm using two gesture recognizers on my <code>UIView</code>. One is standard <code>UITapGestureRecognizer</code>, another is very simple touch down recognizer I wrote:</p>
  
  <pre><code>@implementation TouchDownGestureRecognizer
  
  - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
      if (self.state == UIGestureRecognizerStatePossible) {
          self.state = UIGestureRecognizerStateRecognized;
      }
  }
  
  - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
      self.state = UIGestureRecognizerStateFailed;
  }
  
  - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
      self.state = UIGestureRecognizerStateFailed;
  }
  
  @end
  </code></pre>
  
  <p>They work together only if I assign a delegate to both of them that contains this method:</p>
  
  <pre><code>- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
      return YES;
  }
  </code></pre>
  
  <p>It's all working fine, but when I perform a long press on that view, touch down recognizer fires and touch up recognizer doesn't. For short taps everything is fine, they both fire.</p>
  
  <p>I implemented all methods in <code>UIGestureRecognizerDelegate</code> to return YES to no avail. If I'm adding logging to see the interaction with delegate and inside my own recognizer, I can see that for both short and long taps the invocations sequence is identical — except for the call to touch up recognizer. What do I do wrong?</p>