且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS UIWebView拦截链接点击

更新时间:2023-02-08 08:55:46

是的,看看在 UIWebViewDelegate协议参考,特别是 webView:shouldStartLoadWithRequest:navigationType:

Yes, look at the UIWebViewDelegate Protocol Reference, specifically webView:shouldStartLoadWithRequest:navigationType:

NSURLRequest 会告诉您他们点击的链接将指向他们的位置。

The NSURLRequest will let you know where the link they clicked is going to direct them.

您只需返回 NO 。