去除tableViewCell的横线和屏幕的间距

-(void)viewDidLayoutSubviews {spa

    

    if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {3d

        [self.tableView setSeparatorInset: UIEdgeInsetsZero];orm

    }table

    if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)]) {select

        [self.tableView setLayoutMargins: UIEdgeInsetsZero];margin

    }top

}tab

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPat{view

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

        [cell setLayoutMargins:UIEdgeInsetsZero];

    }

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

        [cell setSeparatorInset:UIEdgeInsetsZero];

    }

}

相关文章
相关标签/搜索