title: Why does tableVieW:viewForHeaderInSection ignore the frame property of my UILabel?
body: <p>Basically I want to change the font and the color of my section header, so I implement <code>tableVieW:viewForHeaderInSection</code>. First I tried this code:</p>
  
  <pre><code>-(UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
      UILabel* headerLabel = [[[UILabel alloc] init] autorelease];
      headerLabel.frame = CGRectMake(10, 0, 300, 40);
      headerLabel.backgroundColor = [UIColor clearColor];
      headerLabel.textColor = [UIColor blackColor];
      headerLabel.font = [UIFont boldSystemFontOfSize:18];
      headerLabel.text = @"My section header";
  
      return headerLabel;
  }
  </code></pre>
  
  <p>but for some reason the frame property is ignored (I'm talking about the 10px inset on the left). Now I use the following:</p>
  
  <pre><code>-(UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
      UIView* headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 40)] autorelease];
  
      UILabel* headerLabel = [[UILabel alloc] init];
      headerLabel.frame = CGRectMake(10, 0, 300, 40);
      headerLabel.backgroundColor = [UIColor clearColor];
      headerLabel.textColor = [UIColor blackColor];
      headerLabel.font = [UIFont boldSystemFontOfSize:18];
      headerLabel.text = @"My section header";
  
      [headerView addSubview:headerLabel];
      [headerLabel release];
  
      return headerView;
  }
  </code></pre>
  
  <p>with the desired results. Can someone explain to me why the second approach works and the first doesn't?</p>
  
  <p>PS. In both cases I implement <code>tableView:heightForHeaderInSection</code> as well, returning 40.0</p>