title: Can't figure out why my stackviews are not arranging vertically
body: <p>I have done this many times but this time for some reason won't work the way it usually does. Am I doing something wrong here? I am just trying to get two views into my UIstackView and distribute them vertically. It seems to keep overlapping and going all over the place. At one point it was only even showing one view.</p>
  
  <p>My viewdidload():</p>
  
  <pre><code>override func viewDidLoad() {
          super.viewDidLoad()
          view.backgroundColor = .red
          view.addSubview(headerView)
          view.addSubview(contentView)
          contentView.addSubview(contentStack)
  
  
          headerView.heightAnchor.constraint(equalTo: self.view.heightAnchor, multiplier: 0.30).isActive = true
          headerView.widthAnchor.constraint(equalTo: self.view.widthAnchor).isActive = true
          headerView.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true
          headerView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true
  
          contentView.heightAnchor.constraint(equalTo: self.view.heightAnchor, multiplier: 0.70).isActive = true
          contentView.widthAnchor.constraint(equalTo: self.view.widthAnchor,multiplier: 0.90).isActive = true
          contentView.topAnchor.constraint(equalTo: headerView.bottomAnchor,constant: 20).isActive = true
          contentView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true
  
  
  
      }
  </code></pre>
  
  <p>My Views and Labels:</p>
  
  <pre><code>fileprivate lazy var headerView : UIView = {
  
          var view = UIView()
          view.translatesAutoresizingMaskIntoConstraints = false
          view.backgroundColor = .black
          return view
  
          }()
      fileprivate lazy var contentView : UIView = {
  
          var view = UIView()
          view.backgroundColor = .lightGray
          view.translatesAutoresizingMaskIntoConstraints = false
  
          return view
  
      }()
  
      fileprivate lazy var contentStack : UIStackView = {
  
  
  
          var stack = UIStackView(arrangedSubviews: [EarningsView,ListingsView,])
  
          stack.translatesAutoresizingMaskIntoConstraints = true
          stack.distribution = .fillEqually
          stack.alignment = .fill
          stack.axis = .vertical
  //        stack.spacing = 5
  
          return stack
  
      }()
      fileprivate lazy var EarningsView : UIView = {
  
          let EarningsView = UIView()
          EarningsView.translatesAutoresizingMaskIntoConstraints = false
          EarningsView.backgroundColor = .blue
  
           EarningsView.addSubview(EarningsLabel)
           EarningsView.addViewBorder(borderColor: UIColor.black.cgColor, borderWith: 0.5, borderCornerRadius: 0.0)
  
          return EarningsView
  
      }()
      fileprivate lazy var EarningsLabel : UILabel = {
          let EarningsLabel = UILabel()
          EarningsLabel.translatesAutoresizingMaskIntoConstraints = false
          let earningsText = NSAttributedString(string: "My Earnings", attributes: self.stringAttrib)
          EarningsLabel.attributedText = earningsText
          EarningsLabel.textColor = .black
          EarningsLabel.backgroundColor = .white
          EarningsLabel.textAlignment = .center
  
  
          return EarningsLabel
  
      }()
  
      fileprivate lazy var ListingsView : UIView = {
  
          let ListingsView = UIView()
  
          ListingsView.translatesAutoresizingMaskIntoConstraints = false
  
          ListingsView.addSubview(ListingLabel)
          ListingsView.addViewBorder(borderColor: UIColor.black.cgColor, borderWith: 0.5, borderCornerRadius: 0.0)
          ListingsView.backgroundColor = .red
          return ListingsView
      }()
      fileprivate lazy var ListingLabel : UILabel = {
          let ListingLabel = UILabel()
          ListingLabel.translatesAutoresizingMaskIntoConstraints = false
  
          let listingText = NSAttributedString(string: "My Listing", attributes: self.stringAttrib)
          ListingLabel.attributedText = listingText
  
  
          return ListingLabel
      }()
  </code></pre>
  
  <p>This is driving me crazy because I have done it so many times before and now I have spent atleast 6 hours on this little part trying to figure it out. Of course I could just create a whole new viewcontroller but I just want to figure this out.<a href="https://i.stack.imgur.com/u5Naf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u5Naf.png" alt="Screenshot of Overlapping"></a></p>