I am surprised I haven't seen many entries for this issue. 开发者_如何学JAVAI can't find a solution for it. Any help will be appreciated.
I have a UIWebView, which displays MOST of the content in my website but always cutting off some of the content at the bottom and I can't scroll down to it.
When I try to scroll to it (swiping up), I can see the rest of the content but I get the "bounce" effect as soon as I release the swipe so I don't actually get to scroll to the rest of it. (i.e., the UIWebView bounces back cutting off the content).
I tried with another site, on which I can scroll, but the same happened. The last 100 or so pixels get cut off and I can't get to it.
Has anyone else seen this? Is there a solution for it? Thank you Polo
Check and make sure your UIWebView isn't larger than the bounds of your view/screen. It sounds like it's taller than the view it's embedded in (or your device's viewable area) and the last ~100px are rendered correctly off-screen, giving the impression that you can pull them to view but they always snap back to their default position outside of your visible area.
This is over 3 years old, but I realized that dominic does not point to the right solution.
To get the scroll view to show all content while scrolling, follow through:
go to your storyboard
click on the parent view that contains your UIWebview
In the right panel, click on File Inspector button, then locate the Auto Layout and deselect it
then, click on the UIScrollview
click on the Size Inspector
make sure everything in the autosizing box is selected (all 4 directions inside and outside the
small box). That will make your scroll view expand or shrink if necessary.
that should get the scrollview inside the uiwebview to work properly.
精彩评论