自定义viewForHeaderInSection、自定义组头的显示
如何更改UITableView的section 头部(各分组头部)显示呢?
//自定义viewForHeaderInSection - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIView *viewSection = [[[UIView alloc] initWithFrame:CGRectMake(10, 10, 100, 20)]; UILabel *textSection = [[UILabel alloc] initWithFrame:CGRectMake(10,2, 40, 20)]; textSection.text = @"A"; textSection.textColor =[UIColor redColor]; textSection.backgroundColor = [UIColor clearColor]; textSection.font = [UIFont systemFontOfSize:20.0f]; [viewSection addSubview:textSection]; [textSection release]; return [viewSection autorelease]; }