名前などで4つのセクションに分割したTableViewの色とフォントを変更するのに問題があります。機能しないようです。何が間違っているのかわかりませんか?
- (NSString *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
NSString *sectionName = nil;
switch(section)
{
case 0:
sectionName = [NSString stringWithString:@"Date"];
break;
case 1:
sectionName = [NSString stringWithString:@"Gig"];
break;
case 2:
sectionName = [NSString stringWithString:@"City"];
break;
case 3:
sectionName = [NSString stringWithString:@"Country"];
break;
}
UILabel *sectionHeader = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 40)] autorelease];
sectionHeader.backgroundColor = [UIColor clearColor];
sectionHeader.font = [UIFont boldSystemFontOfSize:18];
sectionHeader.textColor = [UIColor whiteColor];
sectionHeader.text = sectionName;
return sectionName;
}