cell去除底部多余的表格线

cell去掉底部多余的表格线

 //去掉底部多余的表格线

 

    [tableView setTableFooterView:[[UIView alloc] initWithFrame:CGRectZero]];


//最后一行分隔线顶头显示

//http://*.com/questions/25770119/ios-8-uitableview-separator-inset-0-not-working

static void setLastCellSeperatorToLeft(UITableViewCell* cell)

{

    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {

        [cell setSeparatorInset:UIEdgeInsetsZero];

    }

    

    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {

        [cell setLayoutMargins:UIEdgeInsetsZero];

    }

    

    if([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]){

        [cell setPreservesSuperviewLayoutMargins:NO];

    }

}

版权声明:本文为博主原创文章,未经博主允许不得转载。

2楼u010786678昨天 13:04
谢谢小伙伴的分享,学习了`(*∩_∩*)′
1楼u010786678昨天 13:01
谢谢小伙伴的分享,学习了`(*∩_∩*)′