title: How to cancel a UIWebView?
body: <p>I'm modally presenting a <code>UIViewController</code> with a <code>UIWebView</code> as its view. How do I dismiss the <code>UIWebView</code> when the user hits a cancel button on it?</p>
  
  <p>One idea I have is to have the cancel button link to <a href="http://cancel">http://cancel</a> and then check in </p>
  
  <pre><code>- (void)webViewDidStartLoad:(UIWebView *)webView
  </code></pre>
  
  <p>If <code>webView.request.URL.host isEqualToString:@"cancel"</code>, then dismiss the view controller.</p>
  
  <p>Does the host have to have a dot in it, e.g., "cancel.com"?</p>