I want to place the dateInfo stack view below the userInfoStack view.
This is what it currently looks like 
How can I place the stack view vertically one below the other? I tried adjusting the distribution, but it doesn't solve the problem.
I am trying to create reusable banner in the UI.
class UserCell: UIView {
var rootStack = UIStackView()
var userInfoStackView = UIStackView()
var dateInfoStackView = UIStackView()
override init(frame: CGRect) {
super.init(frame: frame)
setUPViews()
addComponents()
layoutComponents()
}
private func setUPViews(){
rootStack = UIStackView()
rootStack.translatesAutoresizingMaskIntoConstraints = false
rootStack.alignment = .center
rootStack.distribution = .fillEqually
rootStack.spacing = 5
userInfoStackView = UIStackView()
userInfoStackView.axis = .horizontal
userInfoStackView.spacing = 10
dateInfoStackView = UIStackView()
dateInfoStackView.axis = .vertical
dateInfoStackView.spacing = 2
}
private func addComponents() {
userInfoStackView.addArrangedSubview(nameLabel)
userInfoStackView.addArrangedSubview(compCode)
dateInfoStackView.addArrangedSubview(captionLabel)
dateInfoStackView.addArrangedSubview(dateLabel2)
}
private func layoutComponents() {
addSubview(rootStack)
rootStack.addArrangedSubview(userInfoStackView)
rootStack.addArrangedSubview(dateInfoStackView)
rootStack.snp.makeConstraints { (make) in
make.edges.equalToSuperview()
}
}
}