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

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

      1. <tfoot id='apspR'></tfoot>

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

        如何在 UIWebView 中设置内容偏移量和内容大小

        How to set content offset and content size in a UIWebView(如何在 UIWebView 中设置内容偏移量和内容大小)

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

          <legend id='FQQKB'><style id='FQQKB'><dir id='FQQKB'><q id='FQQKB'></q></dir></style></legend>
              <bdo id='FQQKB'></bdo><ul id='FQQKB'></ul>
            • <tfoot id='FQQKB'></tfoot>
                <tbody id='FQQKB'></tbody>
                1. <i id='FQQKB'><tr id='FQQKB'><dt id='FQQKB'><q id='FQQKB'><span id='FQQKB'><b id='FQQKB'><form id='FQQKB'><ins id='FQQKB'></ins><ul id='FQQKB'></ul><sub id='FQQKB'></sub></form><legend id='FQQKB'></legend><bdo id='FQQKB'><pre id='FQQKB'><center id='FQQKB'></center></pre></bdo></b><th id='FQQKB'></th></span></q></dt></tr></i><div id='FQQKB'><tfoot id='FQQKB'></tfoot><dl id='FQQKB'><fieldset id='FQQKB'></fieldset></dl></div>
                  本文介绍了如何在 UIWebView 中设置内容偏移量和内容大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  由于格式原因,我不得不将 UIScrollView 更改为 UIWebView.

                  I have had to change a UIScrollView into a UIWebView due to formatting reasons.

                  虽然我需要能够将内容偏移量返回到 0, 0 有一个问题(因为我正在使用可重用的 UIWebViews 并更改内容)并获取内容大小,以便我可以在底部放置一个按钮;但是UIWebView好像没有这个.

                  There is a problem though that I need to be able to get the content offset back to 0, 0 (as I am using reusable UIWebViews and changing content) and get the content size so I can place a button at the bottom; but UIWebView does not seem to have this.

                  推荐答案

                  我发现解决问题的最佳方法是:

                  The best way I found to sort the problem was:

                  1. 创建一个UIWebView
                  2. 把它放在一个UIScrollView
                  3. 使用loadHTMLString"将 HTML 添加到其中
                  4. 使用- (void)webViewDidFinishLoad:(UIWebView *)webView {"委托方法检测UIWebView的大小

                  UIWebView的frame设置为内容大小.

                  Set the frame of the UIWebView to the content size.

                  然后使用 UIScrollView 的功能而不是 UIWebView.

                  Then used the functionality of the UIScrollView instead of the UIWebView.

                  谢谢-JM

                  这篇关于如何在 UIWebView 中设置内容偏移量和内容大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                  ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                  Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                  MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)
                  How to add and get the values from .plist in iOS(如何在 iOS 中从 .plist 添加和获取值)
                  Mobile Device Management with iPhone(使用 iPhone 进行移动设备管理)
                  <i id='PX3WV'><tr id='PX3WV'><dt id='PX3WV'><q id='PX3WV'><span id='PX3WV'><b id='PX3WV'><form id='PX3WV'><ins id='PX3WV'></ins><ul id='PX3WV'></ul><sub id='PX3WV'></sub></form><legend id='PX3WV'></legend><bdo id='PX3WV'><pre id='PX3WV'><center id='PX3WV'></center></pre></bdo></b><th id='PX3WV'></th></span></q></dt></tr></i><div id='PX3WV'><tfoot id='PX3WV'></tfoot><dl id='PX3WV'><fieldset id='PX3WV'></fieldset></dl></div>

                      <tbody id='PX3WV'></tbody>
                    • <bdo id='PX3WV'></bdo><ul id='PX3WV'></ul>

                    • <legend id='PX3WV'><style id='PX3WV'><dir id='PX3WV'><q id='PX3WV'></q></dir></style></legend>
                      <tfoot id='PX3WV'></tfoot>

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