iphone - How to reset UIWebView's zoom? I'm already using scalesPagesToFit = YES; -


i've been looking past week answer question.

i have uiwebview, inside of uiscrollview. works great, want content of uiwebview reset zoom, when orientation changes.

in html inside uiwebview, set width of viewport (w/ meta tag) "device-width" , on obj-c side, set scalespagestofit = yes;

i've tried resetting zoom javascript; replacing meta tags in runtime; reloading; accessing uiscrollview inside of uiwebview; etc...

but no success.

any of gods know workaround?

the 1 can think off recreate uiwebviews every time change orientation, makes them flash white whilst rendering content, looks terrible :(

any thoughts?

many thanks, andre

i'm guessing here , haven't tried, afaik uiwebview has uiscrollview child. 1 should able do:

for (uiscrollview *scroll in [mywebview subviews]) {     // make sure scroll view , reset zoom scale.     if ([scroll respondstoselector:@selector(setzoomscale:)])         [scroll setzoomscale:1.0]; } 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -