uiwebview zoom and image width issue
I use UIWebView
to load html constructed from strings.
Please see the code below. I have 2 possibly related problems:
limited zooming: it stops zooming after a scale ~2, but I would like the user to be able to zoom all the way up to the maximum which I understand is 10. (The minimum-scale and maximum-scale properties also affect the behavior when changing orientations. The range of these property values is from >0 to 10.0. The default value for both these properties is 0.25. [src: safari reference library]) So even though I set the maximum-scale to 10, I am only able to zoom ~2.
Please let me know if you have any ideas why that is.incorrect image size landscape/portrait: the img has the width property set to 480 so in case the user wants the landscape mode, the image fills the whole available width. My problem is that in portrait mode the image is not resized/shrinked to 320. I could regex the 480 to 320, but then landscape wou开发者_如何转开发ld have small images.
Below is an example of an img:
And the code for constructing the html (please note the %@ is replaced by all kinds of html containing <p>
<img>
tags)
<html>
<head>
<meta name = \"viewport\" content = \"width=device-width, initial-scale = 1.0, user-scalable = yes, maximum-scale:10.0\">
<title></title>
</head>
<body style=\"-webkit-text-size-adjust:none\" bgcolor=\"White\" link=\"#0099ff\" vlink=\"#808080\" alink=\"#FF0000\" text=\"#000000\">
<font face=\"arial\" size='3'>
<h3>%@</h3>
</font>
<font face=\"arial\" size='2'><p align='right'>Posted on: %@<br>Author: <b>%@</b><br></a>Comments: %@</p>
</font>
<font face=\"arial\" size='2'>"
</font>
</body>
</html>`
Thanks for any insight!
精彩评论