In Xcode 11, the scroll view has two new things, which are the Content Layout Guide and Frame Layout Guide.
It’s a very convenient way to set content size for scrollView.
Let’s check how to use it on the storyboard.
What is the Content Layout Guide?
It is the size of the content. For example, if your scrollView is enabled vertical scrolling only, then set the subviews constraints relative to the Content Layout Guide.
What is the Frame Layout Guide?
It is a fixed size of the content. For example, if scrollView is enabled vertical only, then just set the Frame Layout Guide’s width constraint and leave your height constraint.
How to resolve the constraint warnings?
The above steps is an essential for scrollView with its subView. However Storyboard may still complain.
To solve the constraint issue, change the intrinsic size of the scroll views subView.
Add stackView
For scrolling the contents, I added stackView with listViews.