I\'m setting up content in a scroll view with autolayout. The objects in the scrollview are pinned top-to-bottom to the previous one, so that they are under one another. I h
Fairly easy to do with Auto-Layout only... no code required.
The key is to use a "content view" to hold the elements, and a greater-than-or-equal constraint between your "bottom" element and your "footer" view.
In this image, yellow is the main view, green is the scroll view, blue is the content view, the labels are gray and the footer view is pink.
20 all the way around, so we can see the frame)UIView to the scrollView - this will be our "content view"0 to the scrollView20, vertical spacing to LabelB of 6020, vertical spacing to LabelC of 6020Number of Lines: 0 so it will expand with multiple lines of textUIView as a "footer view" (I stuck a label in it)20 (so we can see the frame)>= 40Priority: 250Now, as you expand/contract the height of LabelC, the footerView will keep at least 40-pts of vertical space. When LabelC gets big enough to "push" footerView below the bottom, scrollView will become scrollable.
Results: