I have built three different cells in my storyboard and hooked all the outlets up, each cell has a unique identifier.

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).

However, how is it that I can make a cell with 'indentifier1' return a certain height and then the others cells returns different heights?

I know I can use `- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath` but I am unsure how to differentiate the cells.

I am using core data and fetch results for the tableview from that.

Edit
----

I have tried this with tags but its crashes at the first `if` statement:

```
- (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;
}

```