1. <small id='1Z32h'></small><noframes id='1Z32h'>

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

        如何判断 UIWebView 何时完成渲染(未加载)?

        时间:2023-10-22

          <tbody id='xf6In'></tbody>
      2. <small id='xf6In'></small><noframes id='xf6In'>

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

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

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

                  问题描述

                  我知道它何时完成加载...(webViewDidFinishLoad),但我想使用

                  I know when its done loading... (webViewDidFinishLoad), but I want to use

                  [webView.layer renderInContext:UIGraphicsGetCurrentContext()];
                  

                  从 UIWebView 创建图像.有时我会在 webView 完成渲染之前得到图像.我可以使用 performSelector 来延迟图像的获取,但是等待的时间是任意且脆弱的.

                  to create an image from the UIWebView. Occasionally I get the image prior to the webView finishing its rendering. I can use performSelector to delay the get of the image, but the amount of wait is arbitrary and brittle.

                  推荐答案

                  这可能取决于您需要将视图渲染到的图形上下文类型,但您可以调用

                  This may depend upon the kind of graphics context you need the view rendered into, but you can call

                  - (void)drawRect:(CGRect)area forViewPrintFormatter:(UIViewPrintFormatter *)formatter
                  

                  这显然会欺骗 UIWebView 认为它正在被打印.如果您的最终目标是捕获完整页面,这可能会有所帮助.我们最近遇到了一个问题,即使页面已完全加载,调用普通的旧 -drawRect: 如果其中一些不在屏幕上,也不会呈现整个页面.

                  which apparently tricks the UIWebView into thinking that it's being printed. This may help if your ultimate goal is to capture the complete page. We've had the problem recently in which even if the page was fully loaded, calling plain old -drawRect: didn't render the entire page if some of it was offscreen.

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

                  上一篇:如何设置“用户代理"?Swift 中 UIWebView 的标头 下一篇:在 UIWebview 中添加了空格 - 在 iOS7 &amp; 中删除 UIWebView 空格iOS8

                  相关文章

                  <tfoot id='Jshg5'></tfoot>

                    1. <small id='Jshg5'></small><noframes id='Jshg5'>

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