title: Is it possible to update the UITableCell's height through cellForRowAtIndexPath?
body: <p>When dealing with UITableViewControllers, is there a way to set the height of an individual table cell other than this method:</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
  </code></pre>
  
  <p>Basically what I am trying to do is insert a block of text into a table cell that would have a variable height. The text could be anywhere between 100-1000 characters long. What I would like to do is make the table cell's height fit the block of text that will be inserted into it. What I am NOT looking is a way to shrink the text to fit into a table cell row of a fixed height (which seems to be the solutions I am finding). Is there a way to call the cell's height through the following method?</p>
  
  <pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
  </code></pre>
  
  <p>Currently, I am doing the following snippet of code to find the height of the text however I don't feel this is the correct / best way of doing this. If I were get the size constraints of the block of text then it only seems logical that I could update the table cell with the proper heights through this method: cellForRowAtIndexPath. Also I was reading that the values returned below are in pixels so would I need to convert from pixels to some other numerical value that would give me the correct height for the row?</p>
  
  <pre><code>CGSize constraintSize;
  constraintSize.width = 500.0f;
  constraintSize.height = 500.0f;
  CGSize theSize = [theText sizeWithFont:[UIFont systemFontOfSize:14.0f] constrainedToSize:constraintSize lineBreakMode:UILineBreakModeWordWrap];
  </code></pre>
  
  <p><strong>UPDATE:</strong>
  So this link seems to do what I wanted:
  <a href="https://stackoverflow.com/questions/1352801/get-tableviewheightforrowatindexpath-to-happen-after-tableviewcellforrowatinde">Get tableView:heightForRowAtIndexPath: to happen after tableView:cellForRowAtIndexPath:?</a></p>
  
  <p>However, the above link still seems to clip the last few characters / words of the text. It all seems to depend on the number of characters / words used in the block of text. I could be wrong. Any ideas?</p>