I have a table view with static cells. In there I have selected the Style Right Detail.
Now I would like to change the background colour of the Detail label on the right-hand side. Even though it's just a label, I'm not able to change the background colour in IB.
So I pulled it into a View Controller to do it programmatically.
@IBOutlet weak var ukPremiumLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
ukPremiumLabel.layer.backgroundColor = UIColor(red: 0/255, green: 159/255, blue: 184/255, alpha: 1.0).cgColor
}
I also tried it this way:
override func viewDidLoad() {
super.viewDidLoad()
ukPremiumLabel.backgroundColor = UIColor.blue
}
I'm not sure why it remains white.

