I am opening an html page in web view and By Clicking an html link i want to open the given link in to web browser and my application should close.
A:
implement UIWebView's shouldStartLoadWithRequest delegete method and inside it write
-(BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request
navigationType:(UIWebViewNavigationType)navigationType {
if (navigationType == UIWebViewNavigationTypeLinkClicked) {
[[UIApplication sharedApplication] openURL:[request URL]];
}
}
mihirpmehta
2010-04-15 08:34:47
when this method will call?
Ankit Vyas
2010-04-15 09:25:13
it will call automatically when any action is taken on UIwebView... but you need to set UIWebView's delegate to that particular class...
mihirpmehta
2010-04-15 09:30:18
Thank you Very Much it working!Thanks a lot
Ankit Vyas
2010-04-15 11:27:25