I have to display multiple views inside a single view controller. I have added a scroll view and added the views through the interface builder. Constraints added to all four sides as well.
Each label (green label) and view (gray view) is embedded in a UIStackView
. I have set the leading, top, trailing and height constraints added to each stack view. No auto layout issues/warnings in Xcode.
But when I run the app, it shows up like this.
Why doesn't the stackview get the width according to the leading and trailing constraints I've set?