title: cancelPreviousPerformRequestsWithTarget not cancelling an outstanding performSelector:withDelay
body: <p>I am using a <code>UIWebView</code> and don't want the navigation bar to appear unless the user taps anywhere on the screen that isn't a link.
  So I have this code to display the navigation bar after a delay:</p>
  
  <pre><code>- (void)handleTapGesture:(UITapGestureRecognizer *)sender  
  {      
  .... 
  [self performSelector:@selector(showNavigationBar) withObject:self afterDelay:0.2]; 
  }
  </code></pre>
  
  <p>I'm not calling <code>showNavigationBar</code> immediately when the tap handler is invoked because the user might have tapped on a link in which case the  tap hander is called <em>before</em> <code>UIWebView</code> <code>shouldStartLoadWithRequest</code>, so if I hid the navigation bar in <code>shouldStartLoadWithRequest</code> it would flash momentarily onto the screen.
  So instead I set it to display after a delay which gives time for the following code to execute within <code>shouldStartLoadWithRequest</code> (and if the user didn't tap on a link <code>shouldStartLoadWithRequest</code> isn't called and the navigation bar is displayed, as it should be in that case).</p>
  
  <pre><code>- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType  
  { 
  [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(showNavigationBar) object:nil];
  ...
  </code></pre>
  
  <p>However this isn't working, I've increased the delay time to several seconds and can confirm <code>cancelPreviousPerformRequestWithTarget</code> is getting called before the navigation bar has been displayed, but when the specified time elapses the bar displays. <code>cancelPreviousPerformRequestWithTarget</code> is having no effect.</p>
  
  <p>Does anybody know why its not working?</p>