title: Why row height is squeezing after scroll for tableView in swift?
body: <p>I am using a tableView and with the tableView I am using a label and my requirement is to make the label auto-adjusting according to the text. So I am calculating dynamic height for my label. It is working fine initially but after scroll the height of the label is reduced. I don't know why.</p>
  <pre><code>// to calculate dynamic height of the label
      func height(constraintedWidth width: CGFloat, font: UIFont) -&gt; CGFloat {
          let label =  UILabel(frame: CGRect(x: 0, y: 0, width: width, height: .greatestFiniteMagnitude))
          label.numberOfLines = 0
          label.lineBreakMode = .byWordWrapping
          label.text = self
          label.font = font
          label.sizeToFit()
  
          return label.frame.height
       }
  </code></pre>