title: Gesture recognition with UIWebView
body: <p>I have set up some gesture recognition in an app that I'm building. One of the gestures is a single finger single tap, which hides the toolbar at the top of the screen. Works great except for one thing: a tap on a link causes the toolbar to go away, too.</p>
  
  <p>Is it possible to detect a tap that was not a tap on a link? Could I do this by seeing where the tap occurred, and only take action if it didn't occur on an html link? Is this is possible, a pointer to how to determine if a link was tapped would be helpful.</p>
  
  <p>Per Octys suggestion, I did attempt to wrap the UIWebView inside a UIView. I'm using interface builder, so I inserted a view in the hierarchy, and made the UIWebView a "child" of the new UIView. The hierarchy looks like this now:</p>
  
  <p><img src="https://i.stack.imgur.com/gN9Bg.png" alt="Hierarchy screen shot"></p>
  
  <p>I added an IBOutlet for the view in my view controller, and linked it up in interface builder.</p>
  
  <p>I changed the gesture recognizer setup to look like this:</p>
  
  <pre><code>UITapGestureRecognizer* singleTap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleSingleTap:)];
  singleTap.numberOfTouchesRequired=1;
  singleTap.delegate=self;
  [self.UIWebViewContainer addGestureRecognizer:singleTap];
  [singleTap release];
  </code></pre>
  
  <p>This code resides in viewDidLoad.</p>
  
  <p>As before, the code correctly sees a single finger single tap, but a tap on a link in the UIWebView also causes the toolbar to go away. I only want the toolbar to go away if a link was NOT tapped.</p>
  
  <p>Anyone have any suggestions?</p>
  
  <p>Thank you.</p>
  
  <p>Chris</p>
  
  <p>Thanks
  Chris</p>