title: how to set table cell height dynamically depending on text label length?
body: <p>I am trying to learn Obj-C and iOS programming, but am still very new. I decided to try and make a simple Reddit client application. I am trying to display the front page posts within a <code>UITableView</code>, with each post represented by its own cell.</p>
  
  <p>On the cell, here is how I am setting the title:</p>
  
  <pre><code>cell.textLabel.numberOfLines = 0;
  cell.textLabel.text = [[tempDictionary objectForKey:@"data"] objectForKey:@"title"];   
  [cell.textLabel sizeToFit];
  </code></pre>
  
  <p>However, the cell ends up clipping itself if the title text is too long. Here's a picture:</p>
  
  <p><img src="https://i.stack.imgur.com/ooya8.png" alt="enter image description here"></p>
  
  <p>How can I make my cells automatically adjust their heights to accommodate longer title labels, without intersecting other cells or the detail text label?</p>
  
  <p>Thank you for any help!</p>