美文网首页
ios cell的分割线顶头 - swift4.0

ios cell的分割线顶头 - swift4.0

作者: JoyGY | 来源:发表于2018-02-26 12:06 被阅读0次

直接复制可用:

    //TODO: 分割线顶头
    //实现方法
    override func viewDidLayoutSubviews() {
        self.tb!.separatorInset = UIEdgeInsets.zero
        self.tb!.layoutMargins = UIEdgeInsets.zero
    }
    //回调 cell回调 滚动屏幕cell将要显示的时候调用
    func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt     indexPath: IndexPath) {
        cell.separatorInset = UIEdgeInsets.zero
        cell.layoutMargins = UIEdgeInsets.zero
    }

相关文章

网友评论

      本文标题:ios cell的分割线顶头 - swift4.0

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