I have the a full screen UIWebView on my ipad app.
When it changes its orientation, I use setFrame to reset the frame size of the UIWebView.
This works sometimes, not always!
1) If the application starts in Portrait, I rotate to landscape, ok no problem, then rotate to Portrait again, ok, still no problem.
2) But if the application starts in Landscape, when I rotate to Portrait, the frame is changed but the content is still in Bigger than the portrait window. I can see horizontal scrollbar for the UIWebview.
Add one line in HTML to fix this:
<meta name=”viewport” content=”width=device-width” />
Found this solution from UIWebView dones’t resize correctly when orientation change ? – Stack Overflow.
