UIWebView toggling scalespagetofit
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 the scalesPageToFit = YES in (checked in IB) I can pinch to zoom the webview but the initial load of the image is too small for the webview:
If I set scalesPageToFit 开发者_如何学C= NO in (unchecked in IB) then the video feed scales properly upon loading, but now the user can not pinch to zoom the picture.
Of course, what I need is for the webpage to load up properly sized AND then allow the user to pinch to zoom, double tap to reset gestures.
Anyone know of a way to do this in either code or javascript etc... ?
Thanks,
Rob
Use meta tag in your i have one sample that is used in 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>
Is this useful?
精彩评论