title: How to make UIStackView scroll with UIScrollView programmatically?
body: <p>I have seen several solutions to make <code>UIStackView</code> scroll with <code>UIScrollView</code> but they all rely Autolayout and IB.</p>
  
  <p>Is there a way to do it programmatically?</p>
  
  <p>I have seen this example: <a href="https://gist.github.com/twostraws/a02d4cc09fc7bc16859c" rel="nofollow">https://gist.github.com/twostraws/a02d4cc09fc7bc16859c</a></p>
  
  <p>But it uses Visual Format Language and I am using the Layout Anchor API.</p>
  
  <p>The layout anchor API:</p>
  
  <pre><code>view.leadingAnchor.constraintEqualToAnchor(otherview.topAnchor).active = true
  </code></pre>