2019-11-07-0002:

1: //横线到最左边1

    if ([  self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {

        // 如果tableView响应了setSeparatorInset: 这个方法,我们就将tableView分割线的内边距设为0.

        [  self.tableView setSeparatorInset:UIEdgeInsetsZero];

    }

    if ([ self.tableView respondsToSelector:@selector(setLayoutMargins:)]) {

        // 如果tableView响应了setLayoutMargins: 这个方法,我们就将tableView分割线的间距距设为0.

        [  self.tableView setLayoutMargins:UIEdgeInsetsZero];

    }

//pragma mark 横线到最左边2

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{

    if ([cell respondsToSelector:@selector(setSeparatorInset:)])

    {

        [cell setSeparatorInset:UIEdgeInsetsZero];//UIEdgeInsetsMake(0, 0, 0, 15)

    }

    if ([cell respondsToSelector:@selector(setLayoutMargins:)])

    {

        [cell setLayoutMargins:UIEdgeInsetsZero];

    }

}

2:BasicDemo 说不定里面有你想要的东西 下载 线程 面试

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容