Objective-c – UIWebView doesn’t respond to link-taps when the link goes to a different domain

iphoneobjective c

I load a page, saw on twitter, using a line like this:

[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://twitter.com/OGOchoCinco"]]];

The page shows up fine. If the user now taps on a link that brings them somewhere else within twitter, she is brought to that page. However, if the link goes to http://twitpic.com, the web view simply doesn't respond. If the user clicks on a twitter.com link again, the browser follows that without a problem.

Any ideas would be appreciated.

Best Answer

I've been able to browse across different domains in my app, so that may not be the problem.

However, the links in a twitter feed seem to target a new browser tab/window, which doesn't work with UIWebView.

See Opening popup links in UIWebView, possible? for potential workarounds.

Related Topic