title: How to cancel button tap if UIGestureRecognizer fires?
body: <p><strong>Update: The problem seems to be the dependency on another GestureRecognizer to fail. See comments and test project below this question!</strong></p>
  
  <p>In my iPhone app I have a view with multiple UIButtons as subviews. The view also has a UITapGestureRecognizer which is listening for taps with two fingers.</p>
  
  <p>When a two-finger-tap occurs on the view I don't want the buttons to react to the tap, even if one of the fingers was inside the button. I thought this is what "cancelsTouchesInView" is for, but that doesn't work.</p>
  
  <p>My question now is: How to tell my buttons to ignore taps when a gesture is recognized?</p>
  
  <p>Edit: This is my gesture recognizer.</p>
  
  <pre><code>UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doubleTapped:)];
  [doubleTap setNumberOfTouchesRequired:2];
  [doubleTap setNumberOfTapsRequired:1];
  [doubleTap setCancelsTouchesInView:YES];
  [doubleTap setDelaysTouchesBegan:YES];
  [doubleTap setDelaysTouchesEnded:YES];
  [self.view addGestureRecognizer:doubleTap];
  [doubleTap release];
  </code></pre>