When I change the label constraint in the sectionheader, as long as I add constant, it will appear: "unable to synchronously satisfy constraints."

I want to set constraint for a label where in the tableview sectionHeader. But when I add constant, I see "Unable to simultaneously satisfy constraints".

so......what should I do.....

func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
    let headerView = UITableViewHeaderFooterView()
    headerView.backgroundView = {
        let view = UIView()
        view.backgroundColor = .red
        return view
    headerView.translatesAutoresizingMaskIntoConstraints = false
    let headerLabel = UILabel()
    headerLabel.translatesAutoresizingMaskIntoConstraints = false
    headerLabel.text = "\(data[section]) Hello WorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHello"
    headerLabel.numberOfLines = 0
        headerLabel.topAnchor.constraint(equalTo: headerView.contentView.topAnchor, constant: 16),
        headerLabel.bottomAnchor.constraint(equalTo: headerView.contentView.bottomAnchor),
        headerLabel.trailingAnchor.constraint(equalTo: headerView.contentView.trailingAnchor),
        headerLabel.leadingAnchor.constraint(equalTo: headerView.contentView.leadingAnchor)
    return headerView
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum