在 UIWebView 中缩小(并保持缩小)的问题
在我的应用程序中,我使用 UIWebView 来查看电子邮件内容。我将其 frame
设置为屏幕大小,并且内容通常比屏幕大小大得多,因此我必须向上/向下和向左/向右滚动才能查看整个内容。
我希望能够通过捏合内容来缩小 - 这当然会使所有内容变小 - 这样我就可以立即在屏幕上看到整个电子邮件。目前这是可行的,但问题是,一旦我将手指离开屏幕,内容就会“弹回”到正常大小。
如何捏缩放 UIWebView 以使其保持缩放状态?
In my app, I'm using a UIWebView to view email contents. I'm setting its frame
to the size of the screen, and the contents are usually much larger than the screen size so I have to scroll up/down and left/right to view the entire contents.
I want to be able to zoom out by pinching the contents - which of course makes everything smaller - so that I can see the entire email on the screen at once. This is currently working, but the problem is that as soon as I lift my fingers off the screen, the contents "snap" back to their normal size.
How can I pinch-zoom a UIWebView so that it stays zoomed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试查看 viewport 标记在 webview 的 HTML 内容中。
http://developer.apple.com/库/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html
Try looking at the viewport tag in the HTML content of the webview.
http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html