What you have done is, you placed a single root view for your scrollView. In this case you need to specify enough height that would be consumed by all the subviews inside the root view. (which may be confusing )
Instead of placing all views under one single view, remove that root view, embed all views under scroll view.
i.e
scroll view
-> view 1
-> view 2
-> button
Constraints are as follows:
scrollView -> pin trailing, leading, top and set proper height
This would set scroll view position and size
view 1 -> pin top, trailing , leading to superview and pin bottom to its bottom view (view 2). (Specify height, width if necessary)
view 2 -> pin top, leading, trailing to top view (view 1) and pin bottom to button . (Specify height, width if necessary)
button -> pin top, leading, trailing to top view (view 2) and pin bottom to scroll view. (Specify height, width if necessary)
This will set enough constraints for your scroll view to calculate content.
Let me know if this doesn’t work.