title: Problem with center constraints for stackview. View not centered correctly
body: <p>I have a problem with placing my stackView in the middle of my view controller which has a table view. I have created simple app with tabBarController and each tab bar item has its own navigationView Controller.    </p>
  
  <p>I created my views and placed them inside stackview.</p>
  
  <pre><code>private let myStackView: UIStackView = {
      let stackView = UIStackView()
      stackView.translatesAutoresizingMaskIntoConstraints = false
      stackView.axis = .vertical
      stackView.alignment = .center
      stackView.distribution = .equalSpacing
      stackView.spacing = 16
  
      return stackView
  }()
  
  private let myTitleLabel: UILabel = {
      let label = UILabel()
      label.translatesAutoresizingMaskIntoConstraints = false
      label.textColor = .label
      label.textAlignment = .center
      label.numberOfLines = 0
      label.lineBreakMode = .byWordWrapping
      label.font = UIFont.systemFont(ofSize: 17, weight: .bold)
  
      return label
  }()
  
  private let mySubtitleLabel: UILabel = {
      let label = UILabel()
      label.translatesAutoresizingMaskIntoConstraints = false
      label.textColor = .secondaryLabel
      label.textAlignment = .center
      label.numberOfLines = 0
      label.lineBreakMode = .byWordWrapping
      label.font = UIFont.systemFont(ofSize: 17)
  
      return label
  }()
  </code></pre>
  
  <p>Inside viewDidLoad I added my views and activated constraints.</p>
  
  <pre><code>    myStackView.addArrangedSubview(myImageView)
      myStackView.addArrangedSubview(myTitleLabel)
      myStackView.addArrangedSubview(mySubtitleLabel)
      tableView.addSubview(myStackView)
  
      NSLayoutConstraint.activate([
          myStackView.centerXAnchor.constraint(equalTo: self.centerXAnchor),
          myStackView.centerYAnchor.constraint(equalTo: self.centerYAnchor)
      ])
  </code></pre>
  
  <p>With a prefersLargeTitles set to false it looks like this
  <a href="https://i.stack.imgur.com/bkNP6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bkNP6.png" alt="enter image description here"></a></p>
  
  <p>but when I set my navigation bar to prefers large titles then my view is not centered.
  <a href="https://i.stack.imgur.com/g8FQb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g8FQb.png" alt="enter image description here"></a></p>
  
  <p>I want that stackView to be as a subview of my tableView, because I want this view to be scrollable. (I don't want to use tableView backgroundView, which is not scrollable)
  What am I doing wrong?</p>