title: Different UITableViewCell heights
body: <p>I have built three different cells in my storyboard and hooked all the outlets up, each cell has a unique identifier.</p>
  
  <p>For example I have one cell which holds a picture, another which has a label and another with other contents, so they are all unique and each cell type requires its own height (dynamic or status, it doesn't matter).</p>
  
  <p>However, how is it that I can make a cell with 'indentifier1' return a certain height and then the others cells returns different heights?</p>
  
  <p>I know I can use <code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath</code> but I am unsure how to differentiate the cells.</p>
  
  <p>I am using core data and fetch results for the tableview from that.</p>
  
  <h2>Edit</h2>
  
  <p>I have tried this with tags but its crashes at the first <code>if</code> statement:</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      CGFloat cellHeight;
  
      if ([[tableView cellForRowAtIndexPath:indexPath] tag] == 1) cellHeight = 170;
      else if ([[tableView cellForRowAtIndexPath:indexPath] tag] == 2) cellHeight = 100;
      else if ([[tableView cellForRowAtIndexPath:indexPath] tag] == 3) cellHeight = 140;
  
      return cellHeight;
  }
  </code></pre>