最近開發的應用需要顯示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;
}