UIWebView won't scroll till the end / bottom

╄→гoц情女王★ 提交于 2019-12-03 07:02:10

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!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!