- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *sectionHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, tableView.sectionHeaderHeight)];
sectionHeaderView.backgroundColor = [UIColor colorWithWhite:0 alpha:0];
sectionHeaderView.userInteractionEnabled = YES;
sectionHeaderView.tag = section;
UIImageView *backgroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, -1, tableView.bounds.size.width, 23)];
backgroundImageView.image = [UIImage imageNamed:@"header.png"];
UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(12, 2, tableView.bounds.size.width-10, 18)];
headerLabel.backgroundColor = [UIColor clearColor];
headerLabel.textColor = [UIColor whiteColor];
headerLabel.shadowColor = [UIColor darkGrayColor];
headerLabel.shadowOffset = CGSizeMake(0, 1);
headerLabel.font = [UIFont boldSystemFontOfSize:18];
headerLabel.text = [self tableView:tableView titleForHeaderInSection:section];
[sectionHeaderView addSubview:backgroundImageView];
[sectionHeaderView addSubview:headerLabel];
return sectionHeaderView;
}
修正しました。誰でもこれを使用/変更できます。