如何准确指定 UIWebView 最后一次调用 webViewDidFinishLoad 的时间?

发布于 2024-09-27 07:33:12 字数 438 浏览 8 评论 0原文

我已阅读此问题的上一篇文章, UIWebView - 如何识别“最后一个”webViewDidFinishLoad 消息? 但事实上我并没有得到太多答案。 我需要的是在 webView 上执行一个脚本,但在它完全加载完成之后。 我尝试通过将 HTML 中的帧读取到字符串中来计数,然后对它们进行计数,然后将我读取到的字符串加载到 UIWebView 中,并计算 webViewDidFinishLoad 被调用的次数,但这不起作用。 那么有没有一种方法可以实现这一点,或者任何人都可以告诉我 webViewDidFinishLoad 何时被准确调用,以便我可以计算一些内容并使用它而不是框架。

先感谢您。

I've read the previous post for this question, UIWebView - How to identify the “last” webViewDidFinishLoad message? but in fact I didn't get the answer very much.
what I need is to execute a script on the webView but after it finishes its loading completely.
I've tried to count the frames inside the HTML by reading it to a string and then counting them then loading the string I've read to the UIWebView, and counting the times webViewDidFinishLoad gets called but that's didn't work.
so is there a way to accomplish that, or can any body tell me when webViewDidFinishLoad gets called exactly so I can count something and use it instead of the frames.

thank you in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文