I am working on Stackview and adding two labels , I want to adjust position of labels such that the below label should be a bit right side . E.g in UITableViewCell we have one title and second description goes all the way to right along with increasing content in description part.
mainStackView.centerYAnchor.constraint(equalTo: self.view.centerYAnchor), mainStackView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor)
]
NSLayoutConstraint.activate(mainStackViewConstraints)
bodyLabel.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20).isActive = true
Results should looks like this in imageenter image description here