UIWebView allows pagetofit to scale

I have a situation where I want to load some html

<html><body style="margin: 0; padding: 0;"><img src="/++video?cameraNum=15&width=640&height=480&noScaleUp=1&auth=cmhiOkJpZ01hYw==&7427" width=341 height=256></body></html> 

When I set scalesPageToFit = YES to (marked in IB), I can pinch to increase the webview, but the initial loading of the image is too small for webviewing:

enter image description here

If I set scalesPageToFit = NO to (not checked in IB), then the video tape is correctly scaled at boot, but now the user cannot pinch to enlarge the image. enter image description here

Of course, I need the page to load properly and then allow the user to pinch the pinch, double click on the reset gestures.

Does anyone know a way to do this in code or javascript etc ??

Thanks,

Rob

+4
source share
1 answer

Using the meta tag in yours I have one sample that is used in the ma project.

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" id="iphone-viewport" content="minimum-scale=1.0, maximum-scale=1.0, width=device-width> 

This is useful?

+4
source

All Articles