What I want to do is set the initial zoom scale [and in some cases, content offset, but that is less important] for an external website. But after the app initially sets the zoom and offset, the user should be able to change them, and the app should not interfere.
Some related information is available here, here, and here. But as far as I can tell, none of does what I want.
The meta setting approach looks promising -- but how would I set it when I don't control the html content that will be loaded?
Why not:
If you want to set initial zoom for your web view and then your web view can scaleable. You can try to add meta tag into the head tag of your HTML string at webViewDidFinishLoad protocol method. You can change 'initial-scale', 'minimum-scale'and 'maximum-scale' to adapt to your required. Looks like this:
best one found try adding meta tag in your html page,in your tag.It gets repaired in a eye blink. Try the apple link and select the suitable meta tag for you.
Try this for setting the initial zoom level -
Also dont forget to set
scalesPageToFit
to NO and you're done.if you are loading html and javascriptin uiwebview then in viewport set user-scalable=1.0.