I have the same problem开发者_如何学JAVA as described here: UIWebView doesn't scroll to the bottom of the webpage loaded/created (unfortunately nobody answered there)
I have a UIWebView with inside UIView, and it doesn't scroll to the bottom, it's actually possible to scroll it but it is bouncing back again, so I can't see about bottom 100 px of my WebView, what can it be?
Thank you
Sorry guys, was my fault, I just had to reduce the height of the WebView
I got this problem today. I had set the constraints wrt iPhone 4 inch screen. So when I executed the app on iPhone 3.5 inch screen, it didn't show the bottom part.
The solution was to go to the Interface Builder and click the button to go to 3.5 inch form factor. (the one which alternates between 3.5 and 4 inch form factor).
Then select 'Webview'.
Editor > Resolve Autolayout Issues > Add missing constraints
This solution is for Xcode 5.
If you can't scroll to the bottom end properly using UIWebView
:
1) One way (Programmatically) to solve the problem is using proper autosizing to UIWebView
.
self.webView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin ;
2) Other way (Interface Builder) to solve the problem is using proper autosizing to UIWebView
. Go to Interface Builder->Web View->Size Inspector and tick autosizing parts in all places (As seen on Image above)
Don't forget to disable Autolayout for the web view!
精彩评论