I want to add left padding to text in a UILabel programmatically. I've searched for a solution but nothing that I can get to work within my existing UILabel extension.
class TopSideHeaderLabel: UILabel {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
adjustsFontSizeToFitWidth = true
font = UIFont(name: Theme.PrimaryFontSemiBold, size: 16)
textColor = Theme.White
backgroundColor = Theme.background2
textAlignment = .left
}
}