views:

227

answers:

1

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.

+4  A: 

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 http://stackoverflow.com/questions/1245224/opening-popup-links-in-uiwebview-possible for potential workarounds.

dmercredi
Thanks dmercredi! This was the issue, I had misdiagnosed it. The stack overflow post was useful, as was this one from the web.http://niw.at/articles/2009/02/06/how-to-enable-the-popup-window-on-uiwebview/enBoth of these are workarounds -- it seems that Apple really needs a hook for this.
Vineel Shah