title: UIStackView inside UIScrollView with dynamically changing items
body: <p>I'm trying to have a <code>UIStackView</code> in a <code>UIScrollView</code> with changing content in the <code>UIStackView</code> as shown below in the image. How ever I don't manage to get it to work properly. When I launch my app it does not scroll and only 10 items are shown in the stack view, not the 20 I expected. Also it does not scroll all the way down of the <code>UIStackView</code>.</p>
  
  <p>Note it's important that this can work on both iPhone and iPad even when rotated.</p>
  
  <p><a href="https://i.stack.imgur.com/WE660.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WE660.png" alt="Scene"></a></p>
  
  <p>I have the following code in my View Controller (that's all):</p>
  
  <pre><code>@IBOutlet weak var stackView: UIStackView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      for i in 1 ... 20 {
          let vw = UILabel()
          vw.text = "Holiday #\(i)"
          stackView.addArrangedSubview(vw);
      }
  }
  </code></pre>