Andriy Tsymbaliuk
можно пример?
let heder = UIView()
let heightHeder:CGFloat = 200
tableView.tableHeaderView = heder
heder.backgroundColor = .clear
heder.translatesAutoresizingMaskIntoConstraints = false
heder.widthAnchor.constraint(equalTo: tableView.widthAnchor, multiplier: 1).isActive = true
heder.heightAnchor.constraint(equalToConstant: heightHeder).isActive = true
heder.centerXAnchor.constraint(equalTo: tableView.centerXAnchor, constant: 0).isActive = true
tableView.tableHeaderView?.frame = CGRect(x: tableView.frame.minX,
y: tableView.frame.minY,
width: tableView.frame.width,
height: heightHeder)