This app follows https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/LayoutUsingStackViews.html#//apple_ref/doc/uid/TP400 that was ccreated by storyborad. In this same app fetaures are managed by autolayout programmatically.
When we are using stack view and scroll view alternetively or simultaneously Its little bit tricky. In this app you can get how UIStackView gets managed in both schenario.