I’ve got a ViewController with a UIToolBar at the top and a UIWebView underneath. The WebView fills the entire remaining portion of the View and is set to stretch, being anchored at the top and left.
The content of the webpage is 3-4 screens long, but when I scroll down through the WebView, I can see it all. However, if I dynamically hide the UIToolBar, then re-show it again, the WebView ends up being “too big” — it’s actually longer than the space available in the ViewController, so now when I scroll through my 4 pages of content, I get to the bottom and it tends to “bounce back” and won’t display the bottom half inch of web content.
Is there a way to re-size the webview after hiding the UIToolBar?
webView.frame = self.view.frameafter the hiding of the nav bar should do the trick. also try
webView.scrollView.alwaysBounceVertical = NO;to try to eliminate bouncing if it is having an undesirable effect. Cheers!