有没有办法捕获UIWebView中链接的点击次数。我想找出用户点击的地址,但实际上没有找到该页面。

这可能吗?

有帮助吗?

解决方案

是的,您可以查看控制器可以实现的委托方法:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

参考:

http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIWebViewDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIWebViewDelegate/webView:shouldStartLoadWithRequest: navigationType

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top