Link follows when using UIWebView+AFNetworking

落花浮王杯 提交于 2019-12-05 16:43:31

It might be worth reading through the implementation of UIWebView+AFNetworking (it's only 120 lines).

What you're looking for isn't implemented by this class. Furthermore, since UIWebView+AFNetworking is a category, which extends an existing object, implementing it in this class would require setting the UIWebView's delegate to itself, which would stop you from responding to any of its delegate methods.

Your discussed possible approach - returning NO to -[id<UIWebViewDelegate> webView:shouldStartLoadWithRequest:navigationType:] and then redirecting to use the method you want is the right approach. (You'll need to return YES for your own request.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!