如何设置不同组section的的头部高度?tableView heightForHeaderInSection


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

//获取indexPath
    NSIndexPath *indexPath = [[NSIndexPath alloc]initWithIndex:section];
    if (0 == indexPath.section) {//第一组
        return 20;
    }else
    return 15;
}



猜你喜欢

转载自blog.csdn.net/ximiaoweilai/article/details/46456649