Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ScrollView "bug" on iOS 10, swift 4 [duplicate]

I have a problem with scrollView. As you can see in the picture, the scrolling part ends about 50 px under the navigationBar, however, the scrollView ends right under the navBar

iOS 10

On iOS 11 it works how it should as you can see in this screenshot:

iOS 11

As for the constraints, here is a screenshot of them.

RoundedView constraints

Superview is scrollView and ScrollView is centered X and Y in the main View + top, bottom, left and right.

Do you know what the problem might be? Any help much appreciated!

like image 868
Phyber Avatar asked Jan 29 '23 08:01

Phyber


1 Answers

Set the viewController property automaticallyAdjustsScrollViewInsets to NO, by default it's YES.

like image 129
Huso Avatar answered Jan 31 '23 22:01

Huso