Header" label.font = UIFont.boldSystemFont(ofSize: 15) label.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(label) let guide = contentView.readableContentGuide NSLayoutConstraint.activate([ label.topAnchor.constraint(equalTo: guide.topAnchor), label.bottomAnchor.constraint(equalTo: guide.bottomAnchor), label.leadingAnchor.constraint(equalTo: guide.leadingAnchor), label.trailingAnchor.constraint(equalTo: guide.trailingAnchor), ]) }