Grouped UITableview remove outer separator line

前端 未结 19 2216
遇见更好的自我
遇见更好的自我 2020-12-02 10:58

I have a grouped UITableview which is created programatically. Also I have a cell with xib file populated in tableview programmatically as well. So far so good. But I want t

19条回答
  •  情话喂你
    2020-12-02 11:28

    iOS 10~13 only remove section head foot line.

    -(void)layoutSubviews{
        [super layoutSubviews];
        //for iOS10~iOS13: only remove section head foot line
        for (UIView * v in self.subviews) {
            if ( v != self.contentView &&
                (v.frame.size.width == self.frame.size.width)){
                [v removeFromSuperview];
            }
        }
    }
    

    if wan to remove all line:

        for (UIView * v in self.subviews) {
            if (v != self.contentView){
                [v removeFromSuperview];
            }
        }
    

提交回复
热议问题