美文网首页
2019-11-07-0002:

2019-11-07-0002:

作者: footSInRoad | 来源:发表于2019-11-07 15:17 被阅读0次

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 说不定里面有你想要的东西 下载 线程 面试

相关文章

网友评论

      本文标题:2019-11-07-0002:

      本文链接:https://www.haomeiwen.com/subject/eirmbctx.html