删除节标题和 uitableviewcell 之间的分隔符

mar*_*ruz 5 uitableview ios

如何去除图中所示的线条?我尝试过以下建议,但没有一个对我有用,

如何删除 UITableView 的边框?

仅删除一个单元格的分隔线

隐藏一个 UITableViewCell 上的分隔线

这是我当前的代码cellForRowAt

       if (indexPath.row == place_sections[indexPath.section].rows.count - 1) {
            cell.separatorInset.left = 1000
            //cell.layer.borderWidth = 0
            //cell.separatorInset = UIEdgeInsetsMake(0, 160, 0, 160);

        }
        if (indexPath.row == 0) {
            cell.separatorInset.left = 1000
            //cell.layer.borderWidth = 0
            //cell.separatorInset = UIEdgeInsetsMake(0, 160, 0, 160);

            //                self.tableview.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: self.tableview.frame.width, height: 1))
        }
Run Code Online (Sandbox Code Playgroud)

谢谢

在此输入图像描述

iOS*_*iOS 0

这是客观的C代码,这对你有帮助

http://www.iostute.com/2015/04/expandable-and-collapsable-tableview.html

对于快速和客观的c

http://www.anexinet.com/blog/expandable-collapsible-uitableview-sections/

第一个链接具有自定义标题视图,因此边框线不会出现在此处。

在 viewForHeaderInSection 函数中注释掉这段代码

// /********** Add a custom Separator with Section view *******************/
//    UIView* separatorLineView = [[UIView alloc] initWithFrame:CGRectMake(15, 40, _expandableTableView.frame.size.width-15, 1)];
//    separatorLineView.backgroundColor = [UIColor blackColor];
//    [sectionView addSubview:separatorLineView];
Run Code Online (Sandbox Code Playgroud)

查看屏幕截图 在此输入图像描述