<legend id='0SJfq'><style id='0SJfq'><dir id='0SJfq'><q id='0SJfq'></q></dir></style></legend>
        <bdo id='0SJfq'></bdo><ul id='0SJfq'></ul>

    1. <tfoot id='0SJfq'></tfoot>
      1. <small id='0SJfq'></small><noframes id='0SJfq'>

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

      2. UIWebView 在加载外部网站时以编程方式设置初始缩放比例?

        UIWebView set initial zoom scale programmatically when loading an external website?(UIWebView 在加载外部网站时以编程方式设置初始缩放比例?)
      3. <i id='wBzAJ'><tr id='wBzAJ'><dt id='wBzAJ'><q id='wBzAJ'><span id='wBzAJ'><b id='wBzAJ'><form id='wBzAJ'><ins id='wBzAJ'></ins><ul id='wBzAJ'></ul><sub id='wBzAJ'></sub></form><legend id='wBzAJ'></legend><bdo id='wBzAJ'><pre id='wBzAJ'><center id='wBzAJ'></center></pre></bdo></b><th id='wBzAJ'></th></span></q></dt></tr></i><div id='wBzAJ'><tfoot id='wBzAJ'></tfoot><dl id='wBzAJ'><fieldset id='wBzAJ'></fieldset></dl></div>

        <tfoot id='wBzAJ'></tfoot>

      4. <small id='wBzAJ'></small><noframes id='wBzAJ'>

              <tbody id='wBzAJ'></tbody>
          • <legend id='wBzAJ'><style id='wBzAJ'><dir id='wBzAJ'><q id='wBzAJ'></q></dir></style></legend>

                  <bdo id='wBzAJ'></bdo><ul id='wBzAJ'></ul>
                  本文介绍了UIWebView 在加载外部网站时以编程方式设置初始缩放比例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想要做的是为外部网站设置初始缩放比例 [在某些情况下,内容偏移,但这并不重要].但在应用初始设置缩放和偏移后,用户应该能够更改它们,并且应用不应该干预.

                  What I want to do is set the initial zoom scale [and in some cases, content offset, but that is less important] for an external website. But after the app initially sets the zoom and offset, the user should be able to change them, and the app should not interfere.

                  这里提供了一些相关信息,这里和这里.但据我所知,没有一个能做我想要的.

                  Some related information is available here, here, and here. But as far as I can tell, none of does what I want.

                  meta 设置方法看起来很有希望——但是当我不控制将要加载的 html 内容时,我该如何设置呢?

                  The meta setting approach looks promising -- but how would I set it when I don't control the html content that will be loaded?

                  推荐答案

                  试试这个设置初始缩放级别 -

                  Try this for setting the initial zoom level -

                  [webView stringByEvaluatingJavaScriptFromString:@"document. body.style.zoom = 5.0;"];
                  

                  另外不要忘记将 scalesPageToFit 设置为 NO,你就完成了.

                  Also dont forget to set scalesPageToFit to NO and you're done.

                  如果您将此设置为是",则网页会缩放以适应用户,并且用户可以放大和缩小.如果否,则禁用用户缩放.默认值为 NO.

                  If you set this to YES, the webpage is scaled to fit and the user can zoom in and zoom out. If NO, user zooming is disabled. The default value is NO.

                  这篇关于UIWebView 在加载外部网站时以编程方式设置初始缩放比例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Resume game cocos2d(恢复游戏 cocos2d)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  How to convert 32 bit PNG to RGB565?(如何将 32 位 PNG 转换为 RGB565?)
                      • <bdo id='lgRty'></bdo><ul id='lgRty'></ul>
                      • <legend id='lgRty'><style id='lgRty'><dir id='lgRty'><q id='lgRty'></q></dir></style></legend>
                          <tbody id='lgRty'></tbody>
                        <i id='lgRty'><tr id='lgRty'><dt id='lgRty'><q id='lgRty'><span id='lgRty'><b id='lgRty'><form id='lgRty'><ins id='lgRty'></ins><ul id='lgRty'></ul><sub id='lgRty'></sub></form><legend id='lgRty'></legend><bdo id='lgRty'><pre id='lgRty'><center id='lgRty'></center></pre></bdo></b><th id='lgRty'></th></span></q></dt></tr></i><div id='lgRty'><tfoot id='lgRty'></tfoot><dl id='lgRty'><fieldset id='lgRty'></fieldset></dl></div>
                        • <small id='lgRty'></small><noframes id='lgRty'>

                          <tfoot id='lgRty'></tfoot>