title: Limit UIWebView to specific URL (Swift)
body: <p>I'm trying to develop an iOS app that features a UIWebView in Swift, however I need it to only work with one domain, and any external links clicked on in that UIWebView to be opened in Safari. (E.G. All links to <code>http://example.com</code> will open within the UIWebView, but a link to <code>http://twitter.com</code> would open in Safari).</p>
  
  <p>I have found a couple of solutions online but the only Swift version (found here: <a href="https://stackoverflow.com/questions/2899699/uiwebview-open-links-in-safari">UIWebView open links in Safari</a>) works to open every link in Safari, I just want external ones to do so.</p>
  
  <p>Could anyone help?
  Thanks.</p>