设置tableviewcell间距

2020-04-22  本文已影响0人  哪有猫不吃鱼

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

{

    if(section ==0) {

        return0.1;

    }

    return10;

}

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

    UIView*view = [[UIViewalloc]init];

    view.backgroundColor = [UIColor clearColor];/

    return view;

}

效果如下  每一个cell为一组

上一篇下一篇

猜你喜欢

热点阅读