阿栋

marvin2_yul

导航

修改(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;
}

posted on 2016-07-19 14:17  阿栋  阅读(465)  评论(0编辑  收藏  举报