- (void)viewDidLoad {
self.tableView.separatorInset = UIEdgeInsetsZero;
self.tableView.layoutMargins = UIEdgeInsetsZero;
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.layoutMargins = UIEdgeInsetsZero;
cell.separatorInset = UIEdgeInsetsZero;
}
- (void)viewDidLoad {
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
// 自己加一个分割线
UIView *line = [[UIView alloc]init]
line.backgroundColor = [UIColor lightGrayColor]
[self addSubview:line]
[line mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.mas_left).offset(0)
make.right.equalTo(self.mas_right).offset(0)
make.bottom.equalTo(self.mas_bottom).offset(0)
make.height.offset(1 / [UIScreen mainScreen].scale)
}]