let myBackgroundView = UIView()
view.addSubview(myBackgroundView)
myBackgroundView.backgroundColor = view.backgroundColor
myTable.tableHeaderView = UITableViewHeaderFooterView()
myTable.tableHeaderView?.snp.makeConstraints { make in
make.top.equalToSuperview().priority(.medium)
make.left.right.equalTo(view)
}
myBackgroundView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalTo(profileTable.tableHeaderView!.snp.top)
}
如果我正确理解了这个问题,那么:
解决问题如下:
是的,我做了页眉而不是页脚,但这并没有真正改变本质。