-ViewController
--View
---ScrollView (Top,Bottom,Leading,Trailing spaces to superview set to 0)
----ContentView (Top,Bottom,Leading,Trailing spaces to superview set to 0, Width equals with View (ViewController's child))
-----Label1
-----etc...
If i set a specific height constraint for my content view (e.g. 1000) the ScrollView works fine, but i got a static ContentView of 1000, which is not my goal, because my contentView got dynamic content, so it should be the height the content needs.
If i delete the height constraint for my ContentView, Xcode says:
Missing Constraints:
ScrollView need constraints for: Y position or height
ScrollView is actually pinned at top and bottom, so i don't know why Xcode want's a height constraint for the ScrollView...
What is the right way to go, when i want the ContentView height to be the height the content needs?
See Question&Answers more detail:os