Currently I am trying to do this using iOS 10.0
Lets say I have a ScrollView with one child subview (which is a view that consists of three other views). Schema looks like this:
UIView
->ScrollView
-->View Container
--->TopView
--->MiddleView
--->BottomView
Both TopView and MiddleView have dynamic height (it may be smaller or bigger depending on content).
I believe that I have set constraints properly (I have been following this tutorial - https://spin.atomicobject.com/2014/03/05/uiscrollview-autolayout-ios/)
The problem itself looks like this: the BottomView gets truncated (or in other words doesn't want to grow). Though the content of BottomView is displayed - it is displayed below View Container's bounds. So it is impossible to see all subviews and controls of BottomView ('cause bounce effect of scroll view comes into play)
Any suggestions what is going on or where the problem might be ?
Solved
The following did the trick: I have put my ScrollView in a View so now hierarchy looks like this (see image)
The only thing that I need to do is figure out how to properly handle additional space that remains after hiding some views from MiddleView and TopView (setting those views height constraints constant value to 0 is not enough for some reason..). But this is quite out of scope of my question :)
EDIT:
For those who wants to know how to fix the problem with additional space I described above, here is the link that helped me to solve it - solution