<legend id='C172p'><style id='C172p'><dir id='C172p'><q id='C172p'></q></dir></style></legend>
  1. <small id='C172p'></small><noframes id='C172p'>

  2. <i id='C172p'><tr id='C172p'><dt id='C172p'><q id='C172p'><span id='C172p'><b id='C172p'><form id='C172p'><ins id='C172p'></ins><ul id='C172p'></ul><sub id='C172p'></sub></form><legend id='C172p'></legend><bdo id='C172p'><pre id='C172p'><center id='C172p'></center></pre></bdo></b><th id='C172p'></th></span></q></dt></tr></i><div id='C172p'><tfoot id='C172p'></tfoot><dl id='C172p'><fieldset id='C172p'></fieldset></dl></div>

  3. <tfoot id='C172p'></tfoot>
      • <bdo id='C172p'></bdo><ul id='C172p'></ul>

      如何检测 UIWebView 何时完全完成加载?

      时间:2023-10-22

        • <bdo id='xG3ux'></bdo><ul id='xG3ux'></ul>
          1. <i id='xG3ux'><tr id='xG3ux'><dt id='xG3ux'><q id='xG3ux'><span id='xG3ux'><b id='xG3ux'><form id='xG3ux'><ins id='xG3ux'></ins><ul id='xG3ux'></ul><sub id='xG3ux'></sub></form><legend id='xG3ux'></legend><bdo id='xG3ux'><pre id='xG3ux'><center id='xG3ux'></center></pre></bdo></b><th id='xG3ux'></th></span></q></dt></tr></i><div id='xG3ux'><tfoot id='xG3ux'></tfoot><dl id='xG3ux'><fieldset id='xG3ux'></fieldset></dl></div>

            <small id='xG3ux'></small><noframes id='xG3ux'>

              <tbody id='xG3ux'></tbody>
            <tfoot id='xG3ux'></tfoot>

            <legend id='xG3ux'><style id='xG3ux'><dir id='xG3ux'><q id='xG3ux'></q></dir></style></legend>

                本文介绍了如何检测 UIWebView 何时完全完成加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试为 UIWebView 构建一个过滤器,并且我正在努力检测 UIWebView 何时完全完成加载.我使用了以下两种方法

                I am trying to build a filter for a UIWebView and I am struggiling to detect when the UIWebView has completely finished loading. I have used the following two methods

                – webView:shouldStartLoadWithRequest:navigationType:
                – webViewDidFinishLoad:
                

                但问题是当页面有框架和其他内容要加载时,这些将被多次调用.

                but the issue is that these will be called multiple times when a page has frames and additional content to load.

                我需要知道视图何时已完全加载并且没有更多内容要获取.然后,当内容加载完毕后,我可以对照批准的 URL 列表检查页面的 URL.

                What I need is to know when the view has completely loaded and there is no more content to fetch. Then when the content has loaded I can check to URL of the page against a list of approved URLS.

                有什么想法吗?

                推荐答案

                使用UIWebViewDelegate协议方法webViewDidFinishLoadwebView的isLoading属性

                 - (void)webViewDidFinishLoad:(UIWebView *)webView
                 {
                    //Check here if still webview is loding the content
                    if (webView.isLoading)
                       return;
                
                    //after code when webview finishes
                    NSLog(@"Webview loding finished");
                 }
                

                这篇关于如何检测 UIWebView 何时完全完成加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:将 UITapGestureRecognizer 添加到 UIWebView 下一篇:如何可靠地检测 UIWebView 中的链接点击?

                相关文章

                  <bdo id='cb9aF'></bdo><ul id='cb9aF'></ul>
                    <tfoot id='cb9aF'></tfoot>
                    <legend id='cb9aF'><style id='cb9aF'><dir id='cb9aF'><q id='cb9aF'></q></dir></style></legend>
                  1. <i id='cb9aF'><tr id='cb9aF'><dt id='cb9aF'><q id='cb9aF'><span id='cb9aF'><b id='cb9aF'><form id='cb9aF'><ins id='cb9aF'></ins><ul id='cb9aF'></ul><sub id='cb9aF'></sub></form><legend id='cb9aF'></legend><bdo id='cb9aF'><pre id='cb9aF'><center id='cb9aF'></center></pre></bdo></b><th id='cb9aF'></th></span></q></dt></tr></i><div id='cb9aF'><tfoot id='cb9aF'></tfoot><dl id='cb9aF'><fieldset id='cb9aF'></fieldset></dl></div>

                  2. <small id='cb9aF'></small><noframes id='cb9aF'>