cell去掉底部多余的表格线

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

 

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


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

//http://stackoverflow.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];

    }

}

你可能感兴趣的:(ios,UITableViewCell,ios开发)