iOS自定义组与组之间的距离以及视图

 

 

 

iOS自定义组与组之间的距离以及视图

//头视图高度

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {

    return 10;

}

 

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {

    UIView *headerView = [[UIView alloc] init];

    headerView.backgroundColor = [UIColor clearColor];

    return headerView;

}

 

//脚视图高度

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {

    return 5;

}

 

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {

    UIView *footerView = [[UIView alloc] init];

    footerView.backgroundColor = [UIColor clearColor];

    return footerView;

}

posted @ 2017-06-15 16:24  李洪强  阅读(287)  评论(0编辑  收藏  举报