title: How to customize the background color of the standard label within a UITableViewCell?
body: <p>I'm trying for the past several hours to figure out how to do this, but with no luck. There are several potential solutions for this when searching Google, but nothing seems to work.</p>
  
  <p>I'm trying to customize the background color of the standard UILabel that goes in a UITableViewCell (since I already customized the background color of the cell itself), but nothing I do seems to work.</p>
  
  <p>I'm creating my own UILabel to customize the colors in -tableView:cellForRowAtIndexPath:</p>
  
  <pre><code>UILabel* label = [[[UILabel alloc] init] autorelease];
  label.textColor = [UIColor blueColor];
  label.backgroundColor = [UIColor redColor];
  label.opaque = YES;
  [cell.contentView addSubview:label];
  cell.text = @"Sample text here";
  </code></pre>
  
  <p>But that doesn't work, and the resulting table view still has a bunch of cells with labels with black text and white background in it.</p>
  
  <p>Any clues on what I am doing wrong here?</p>
  
  <p>UPDATE: If I try to do the following instead:</p>
  
  <pre><code>UILabel* label = [[[UILabel alloc] init] autorelease];
  label.textColor = [UIColor blueColor];
  label.backgroundColor = [UIColor redColor];
  label.opaque = YES;
  [cell.contentView addSubview:label];
  label.text = @"Sample text here";
  </code></pre>
  
  <p>I get a bunch of UITableViewCells with no text at all.</p>