Problem with zooming out (and staying zoomed out) in a 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 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
精彩评论