直接复制可用:
//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
}