最近开发的应用需要显示URL链接,在UIWebView中显示"Click here to see the link"。
For ex: link: http://www.youtube.com/watch?v=pii4G8FkCA4
在这显示 "click here to see the link"
谢谢!
最近开发的应用需要显示URL链接,在UIWebView中显示"Click here to see the link"。
For ex: link: http://www.youtube.com/watch?v=pii4G8FkCA4
在这显示 "click here to see the link"
谢谢!
-(BOOL) webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType {
if ( inType == UIWebViewNavigationTypeLinkClicked ) {
[[UIApplication sharedApplication] openURL:[inRequest URL]];
return NO;
}
return YES;
}