Question

I'm using a UIWebView to display images in base64 (http://www.abluestar.com/utilities/encode_base64/index.php). The UIWebView is set to "Scales Page To Fit" and Mode is "Left". The image might be 400px wide but once rendered in the UiWebView, it takes up not even half of the screen. I need to do something like style="width:800px;..." before it begins to take up most of the screen and is readable (because it isn't so small). Is this the right way? Why does the image shrink in the UIWebView and I have to then stretch it?

Was it helpful?

Solution

The best way I've found to counter this is to use this meta tag in my html head

<meta name="viewport" content="width=320;height=420;user-scalable=yes;initial-scale=1.0;">

Then there's no need to compensate for the scaling effect

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top