I would like users to pinch in my UIWebView
and already set the ScaleToFitPages
to YES.
The page content does not contains anything like
<meta name='viewport' content='width=device-width; initianl-scale=1; maximum-scale:4; ....'>
Could I use any javascript code(jquery or not with jquery) to change the scale to original scale(1:1) after the page loaded(eg. in the delegate method didFinishLoading
...)
In UIWebViewDelegate , there is protocol webViewDidFinishLoad:
that will be call after a web view finishes loading a frame.
so you can put some javascript that custom the scale
[webView stringByEvaluatingJavaScriptFromString: [NSString stringWithFormat:@"your javascript code" ];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.