title: Set row height of a UITableView according to the cell in that row
body: <p>I want to adjust the row height of a UITableView according to the cell in that row.</p>
  
  <p>Initially, I tried to use</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  </code></pre>
  
  <p>However, the problem is, when the table is loading, the calling flow is seemed to be:</p>
  
  <p>First call:</p>
  
  <pre><code>(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  </code></pre>
  
  <p>Then call:</p>
  
  <pre><code>(UIViewTableCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  </code></pre>
  
  <p>which means, before my cell is generated, I have to tell the table the height of its row.</p>
  
  <p>However, what I want is exactly the opposite, i.e., after my cell is generated, I tell the table the height of this rows.</p>
  
  <p>Is there any method to achieve this?</p>