title: UITapGestureRecognizer Programmatically trigger a tap in my view
body: <p><strong>Edit:  Updated to make question more obvious</strong></p>
  
  <p><strong>Edit 2:  Made question more accurate to my real-world problem.  I'm actually looking to take action if they tap anywhere EXCEPT in an on-screen text-field.  Thus, I can't simply listen for events within the textfield, I need to know if they tapped <em>anywhere</em> in the View.</strong></p>
  
  <p>I'm writing unit tests to assert that a certain action is taken when a gesture recognizer recognizes a tap <em>within certain coordinates of my view</em>.  I want to know if I can programmatically create a touch (at specific coordinates) that will be handled by the UITapGestureRecognizer.  <strong>I'm attempting to simulate the user interaction during a unit test.</strong></p>
  
  <p>The UITapGestureRecognizer is configured in Interface Builder</p>
  
  <pre><code>//MYUIViewControllerSubclass.m
  
  -(IBAction)viewTapped:(UITapGestureRecognizer*)gesture {
    CGPoint tapPoint = [gesture locationInView:self.view];
    if (!CGRectContainsPoint(self.textField, tapPoint)) {
      // Do stuff if they tapped anywhere outside the text field
    }
  }
  
  //MYUIViewControllerSubclassTests.m
  //What I'm trying to accomplish in my unit test:
  
  -(void)testThatTappingInNoteworthyAreaTriggersStuff {
    // Create fake gesture recognizer and ViewController
    MYUIViewControllerSubclass *vc = [[MYUIViewControllersSubclass alloc] init];
    UITapGestureRecognizer *tgr = [[UITapGestureRecognizer initWithView: vc.view];
  
    // What I want to do:
    [[ Simulate A Tap anywhere outside vc.textField ]]
    [[  Assert that "Stuff" occured ]]
  }
  </code></pre>