title: How to disable other touch gestures after adding another tap gesture to the view?
body: <p>I have a view with some tables and buttons on it, and then I want to add a tap gesture to the entire view, but I only want that gesture recognizer to recognize taps. </p>
  
  <p>Ideally, I want to do something when the added gesture recognizer is tapped, then remove that gesture recognizer after so the other buttons and tables can be accessed. Basically a tap to dismiss functionality that replicates something like the facebook notifications window, tap outside to dismiss, but not interfere with the buttons outside of the notifications view.</p>
  
  <p>Can anybody help?</p>
  
  <p>My current code is:</p>
  
  <pre><code>    NotificationsWindow *customView = [[[NSBundle mainBundle]loadNibNamed:@"NotificationsWindow" owner:self options:nil]objectAtIndex:0];
      customView.frame= CGRectMake(12, 12, customView.frame.size.width, customView.frame.size.height);
  
      UITapGestureRecognizer *recognizerForSubView = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapBehindAgain:)];
      [recognizerForSubView setNumberOfTapsRequired:1];
      recognizerForSubView.cancelsTouchesInView = NO; //So the user can still interact with controls in the modal view
      [customView addGestureRecognizer:recognizerForSubView];
  
  
      [self.view addSubview:customView];
  
      [self catchTapForView:customView.superview];
  
  (void)handleTapBehind:(UITapGestureRecognizer *)sender
  {
      NSLog(@"tapped");
  
      [[self.view.subviews lastObject] removeFromSuperview];
      [self.view removeGestureRecognizer:sender];
  }
  
       (void)dismissButton:(UIButton *)button {
          [button removeFromSuperview];
          [[self.view.subviews lastObject] removeFromSuperview];
  
      }
  
      (void)catchTapForView:(UIView *)view {
          UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
          button.frame = view.bounds;
          [button addTarget:self action:@selector(dismissButton:) forControlEvents:UIControlEventTouchUpInside];
          [view addSubview:button];
      }
  </code></pre>
  
  <p>I want to make it so that the recognizer for the super view dismisses the subview, but not to interfere with the other taps on the super view.</p>