A frequent question about StackViews inside Scrollviews comes from ambiguous with/heigh alerts on interface builder. As this answer explained, it is necessary to:

  1. Add in the UIScrollView a UIView (the contentScrollView);
  2. In this contentScrollView, set top, bottom, left and right margins to 0
  3. Set also align center horizontally and vertically;