Reputation: 8036
I created an iOS app that uses a UIWebView to display a mobile website. The mobile site shows a "back" button within the UIWebView for its web server serves, but some pages provide links that navigate to external websites.
I want to provide a "back" button on those pages to get back to the original web server, but if I can't do this then I would like to launch these external sites in the standard browser in such a way that the user can still navigate the original site in the UIWebView using the "back" button already being displayed by the mobile site.
As it stands, my app cannot navigate back to the mobile site once a user clicks one of these "external" links because those sites do not display a back button to get back to the mobile app. How can I resolve this?
Upvotes: 1
Views: 211
Reputation: 994
Use the delegate webView:shouldStartLoadWithRequest:navigationType:
and open the external URL's in the safari using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http:/wwww.extrenalurls.com"]]
Upvotes: 1