title: Nested Stack Views: Child Stack View is not inside its parent stack view when attaching it programmatically
body: <p>I'm trying to implement nested stack views in which one stack view is inside another stack view. I've based my code <a href="https://stackoverflow.com/questions/36463021/programmatically-add-subviews-to-a-uistackview">here</a>. My current code is here below.</p>
  
  <pre><code>@IBOutlet weak var verticalStackView: UIStackView!
  let blueImageView = UIImageView()
  blueImageView.backgroundColor = UIColor.blueColor()
  blueImageView.image = UIImage(named: "just some image")
  blueImageView.snp_makeConstraints { (make) in
    make.height.width.equalTo(34)
  }
  
  let greenImageView = UIImageView()
  greenImageView.backgroundColor = UIColor.greenColor()
  greenImageView.image = UIImage(named: "just some image")
  // This is just from SnapKit
  greenImageView.snp_makeConstraints { (make) in
    make.height.width.equalTo(34)
  }
  
  let stackView = UIStackView()
  stackView.axis = UILayoutConstraintAxis.Horizontal
  stackView.distribution = UIStackViewDistribution.EqualSpacing
  stackView.alignment = UIStackViewAlignment.Center
  stackView.spacing = 16.0
  stackView.addArrangedSubview(blueImageView)
  stackView.addArrangedSubview(greenImageView)
  stackView.translatesAutoresizingMaskIntoConstraints = false;
  // This is just from SnapKit
  verticalStackView.snp_makeConstraints { (make) in
    make.height.equalTo(70)
  }
  verticalStackView.addSubview(stackView)
  </code></pre>
  
  <p>When I tried running it looks this way.</p>
  
  <p><a href="https://i.stack.imgur.com/CcUNI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CcUNI.jpg" alt="Just the image"></a></p>
  
  <p>As you can see, the sub stack view <code>stackView</code> is below the parent stack view (<code>verticalStackView</code>) in the hierarchy. But the positioning is off. </p>
  
  <p>I'm quite new with Swift, AutoLayout and StackViews. Anyone that can help point out what I'm missing here?</p>
  
  <p>Thanks!</p>