I'm trying to fix keyboard content covering bug with UIScrollView in my simple learning app. Keyboard didn't cover my textfield, but it covered my other content. So I have textfield at the bottom of the screen, and I placed UIScrollView underneath. I set the following constraints to scrollview:
Scroll View.top = TextField.bottom +5
trailing = Scroll View.trailing
leading = Scroll View.leading
Bottom Layout Guide.top = Scroll View.bottom
And inside scrollview I have UIView with all my content. That UIView is pinned to scroll view's edges (leading, trailing, top and bottom) and have equal width with View. So it looks fine on 4 inch display, like so: iPhone 4 inch
But on bigger screen it don't go all over the screen. Here is the screenshot: iPhone 5.5 inch
It gets even worse on iPad. So I don't get any idea why this weird things are happened. Can anyone help me?
I have seen issues like this when you dealt with autolayout. I would recommend you to check below points.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.