开发者

Problem with zooming out (and staying zoomed out) in a UIWebView

开发者 https://www.devze.com 2023-02-22 16:31 出处:网络
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

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 s开发者_JS百科ize.

How can I pinch-zoom a UIWebView so that it stays zoomed?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号