![tableView 分割线的处理 tableView 分割线的处理](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
有时候根据UI设计图的需要我们需要对原生的TableView分割线做靠左,靠右的操作
在下面这个方法中实现即可。
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 3 && indexPath.row == 1) {
[cell setSeparatorInset:UIEdgeInsetsMake(0, WIDTH, 0, 0)];
}
}