//解决分割线右移15像素问题,步骤1
if ([ self.tableViewrespondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableView setSeparatorInset:UIEdgeInsetsZero];
}
if ([self.tableViewrespondsToSelector:@selector(setLayoutMargins:)]) {
[self.tableViewsetLayoutMargins:UIEdgeInsetsZero];
}
//解决分割线右移15像素问题,步骤2
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
[cell setSeparatorInset:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}