views:

5

answers:

0

I m using this code for setting title and background color with UITableView but title is not shown?

  • (NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section { return @"Contents"; }
  • (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIView *headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 30)] autorelease]; [headerView setBackgroundColor:[UIColor brownColor]]; [self.view sendSubviewToBack:headerView];

    return headerView; }

Please Help...