I am trying to calculate the height of a UILabel based on different String lengths.
func calculateContentHeight() -> CGFloat{ var maxLabelSize: CGSize
@IBOutlet weak var constraintTxtV: NSLayoutConstraint! func TextViewDynamicallyIncreaseSize() { let contentSize = self.txtVDetails.sizeThatFits(self.txtVDetails.bounds.size) let higntcons = contentSize.height constraintTxtV.constant = higntcons }