I have a UIButton created programmatically but can't find a way to left align the title.
This does nothing:
button.setTitle("DESCRIPTION", for: .normal)
button.titleLabel?.textAlignment = .left
Try this one
button.contentHorizontalAlignment = .left
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With