Right now, the edges of the label line up exactly with the end of the text - I want to give the text some padding(?) or space so that you still see some of the background. Is this a constraints issue?
let lblTitle: UILabel = {
let lbl=UILabel()
lbl.text="Try this quiz."
lbl.textColor=UIColor.black
lbl.textAlignment = .justified
lbl.font = UIFont(name: "Gotham", size: 50)
lbl.backgroundColor = UIColor(white: 1, alpha: 0.8)
lbl.adjustsFontSizeToFitWidth = true
lbl.layer.masksToBounds = true
lbl.numberOfLines=0
lbl.sizeToFit()
lbl.layer.cornerRadius = 5
lbl.translatesAutoresizingMaskIntoConstraints=false
lbl.minimumScaleFactor = 0.1
return lbl