title: Calculate UITableViewCell height programmatically text containing "<br>" or "\n"
body: <p>I want to calculate the cell height using code. My text contains html entities like <code>&lt;br&gt;,&lt;b&gt;</code> etc. I tried the following or similar code - </p>
  
  <pre><code>//create a CGFloat variable
  CGFloat _height = 0;
  //find out the size for your text. Instead of 255 insert the width of your label
  CGSize _textSize = [yourString sizeWithFont:[UIFont systemFontOfSize:kFontSize] constrainedToSize:(CGSize) { 255, 9999 }];
  //add the height of that CGSize variable to your height in case you will need to add more values
  _height += _textSize.height;
  </code></pre>
  
  <p>it works fine for single line code and plain text but having issues with text containing html tags.</p>
  
  <p>Please help.</p>