有时候根据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)];

    }

}

 

posted on 2017-03-08 14:25  成长的过程  阅读(140)  评论(0编辑  收藏  举报