//分割线从最左边开始cell中也要设置
if([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
self.tableView.separatorInset = UIEdgeInsetsZero;
}
if([self.tableView respondsToSelector:@selector(setLayoutMargins:)]) {
self.tableView.layoutMargins = UIEdgeInsetsZero;
}
//去掉多余cell
UIView *view = [[UIView alloc]init];
view.backgroundColor = [UIColor clearColor];
[self.tableView setTableFooterView:view];
//分割线从最左边开始tableview也要设置
if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
cell.layoutMargins = UIEdgeInsetsZero;
}