NSString *currentURL
= myWebView.request.URL.absoluteString;
That is assuming myWebView is your UIWebView object.
To open a web page in Safari from a UIWebView, do this:
[[UIApplication sharedApplication]
openURL:myWebView.request.URL];
This is the random ramblings of a programming geek, poker player, trumpet player, fast car nut, and billiards player.
NSString *currentURL
= myWebView.request.URL.absoluteString;
[[UIApplication sharedApplication]
openURL:myWebView.request.URL];
2 comments:
Thanks for the tip!
Awesome, and very elegant. Was trying to implement a JS-based method/assignment, but this one-liner fixed all my problems, and required a lot less code.
Post a Comment