title: Custom UITableViewCell is empty, although cell from heightForRowAtIndexPath is correct
body: <p>Sorry, I am missing it. I have a beautiful table with correct (variable) row heights. But all the cells are blank. Three labels should be populated in each cell.</p>
  
  <p><strong>UPDATE: FIX IS BELOW</strong></p>
  
  <pre><code>@implementation MasterTableCell 
  
  @synthesize labelDesc;
  @synthesize labelDuration;
  @synthesize labelName;
  
  - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
  
  
      // name
      CGRect frameTextLabel = CGRectMake(8, 2, 244, 25);
      labelName = [[UILabel alloc] initWithFrame:frameTextLabel];
      labelName.lineBreakMode = UILineBreakModeTailTruncation;
      labelName.font = [UIFont boldSystemFontOfSize:17.0];
      labelName.textColor = [UIColor blackColor];
  
      // description
      labelDesc = [[UILabel alloc] init];
      labelDesc.lineBreakMode = UILineBreakModeWordWrap;
      labelDesc.numberOfLines = 0;
      labelDesc.textColor = [UIColor grayColor];
      labelDesc.font = [UIFont systemFontOfSize:14.0f];
      labelDesc.backgroundColor = [UIColor blueColor];
  
      // duration
      CGRect frame = CGRectMake(252, 5, 40, 20);
      labelDuration = [[UILabel alloc] initWithFrame:frame];
      labelDuration.font = [UIFont boldSystemFontOfSize:14.f ];
      labelDuration.textAlignment = UITextAlignmentRight;
      labelDuration.backgroundColor = [UIColor redColor]; // to see it
  
      [self.contentView addSubview:labelName];
      [self.contentView addSubview:labelDesc];
      [self.contentView addSubview:labelDuration];
  
    }
    return self;
  }
  
  @end
  </code></pre>
  
  <p>And</p>
  
  <pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
    static NSString *CellIdentifier = @"RecipeCell";
  
    MasterTableCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
     {
      cell = [[MasterTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
     }
  
    Recipe *recipeAtIndex = [sortedArray objectAtIndex:indexPath.row];
  
    cell.labelName.text = @"Test1";
    cell.labelDesc.text = @"Test2";
    cell.labelDuration.text = [TBCommon formattedStringforDuration:recipeAtIndex.duration withDelimeter:@":"];
  
    CGRect frameDescLabel = CGRectMake(8, 25, 284, [self heightForDescriptionFrame:recipeAtIndex.description]);
    cell.labelDesc.frame = frameDescLabel;
  
    return cell;
  }
  </code></pre>
  
  <p><strong>FIX</strong></p>
  
  <pre><code>#import "MasterTableCell.h"
  
  @implementation MasterTableCell : UITableViewCell
  
  @synthesize labelDesc;
  @synthesize labelDuration;
  @synthesize labelName;
  
  - (void)awakeFromNib
  {
      [super awakeFromNib];
  
  // name
  CGRect frameTextLabel = CGRectMake(8, 2, 244, 25);
  labelName = [[UILabel alloc] initWithFrame:frameTextLabel];
  labelName.lineBreakMode = UILineBreakModeTailTruncation;
  labelName.font = [UIFont boldSystemFontOfSize:17.0];
  labelName.textColor = [UIColor blackColor];
  
  // description
  labelDesc = [[UILabel alloc] init];
  labelDesc.lineBreakMode = UILineBreakModeWordWrap;
  labelDesc.numberOfLines = 0;
  labelDesc.textColor = [UIColor grayColor];
  labelDesc.font = [UIFont systemFontOfSize:14.0f];
  
  // duration
  CGRect frame = CGRectMake(252, 5, 40, 20);
  labelDuration = [[UILabel alloc] initWithFrame:frame];
  labelDuration.textColor = [UIColor colorWithRed:38.0/255.0 green:111.0/255.0 blue:208.0/255.0 alpha:1];
  labelDuration.font = [UIFont boldSystemFontOfSize:14.f ];
  labelDuration.textAlignment = UITextAlignmentRight;
  
  [self.contentView addSubview:labelName];
  [self.contentView addSubview:labelDesc];
  [self.contentView addSubview:labelDuration];
  }
  
  @end
  </code></pre>
  
  <p>And</p>
  
  <pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
  static NSString *CellIdentifier = @"Cell";
  
  MasterTableCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
  Recipe *recipeAtIndex = [sortedArray objectAtIndex:indexPath.row];
  
  cell.labelName.text = recipeAtIndex.name;
  cell.labelDesc.text = recipeAtIndex.description;
  cell.labelDuration.text = [TBCommon formattedStringforDuration:recipeAtIndex.duration withDelimeter:@":"];
  
  CGRect frameDescLabel = CGRectMake(8, 25, 284, [self heightForDescriptionFrame:recipeAtIndex.description]);
  cell.labelDesc.frame = frameDescLabel;
  
  return cell;
  
  }
  </code></pre>