I have zoom my webview using the following code on the button click event [webView_ stringByEvaluatingJavaScriptFromString:@"document.body.style.zoom = 5.0;"];
really the webview zoom when i am click that button after few second again 开发者_Python百科webview comes normal state. Pls help me how to maintain that zoom without resize...
Thanks in advance, Suresh.M.
Just add this to your html document head
<meta name='viewport' content='initial-scale=5.0'/>
Also, do
[webView_ setScalesPageToFit:YES];
as iPhoneiPadDev stated, if you want the webview to also allow zooming to different zoom level
cheers
try to use this.
[webView_ setScalesPageToFit:YES];
This will help you.
精彩评论