修改(table的section與上一個section的間距)section header背景顏色
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 30)];
[headerView setBackgroundColor:[UIColor clearColor]];
return headerView;
}
//不要忘記從委托添加這段代碼,,相對于table section的高度(table的section與上一個section的間距)。
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 15;
}
浙公網安備 33010602011771號