I have a UIbutton with some centered text in it. When I programmatically update the text, using: button.titleLabel.text = newValue; it is no longer centered, instead it has a very strange position (nor centered, nor left-aligned)… how can i make the button update the text to be centered horizontally?
I have a UIbutton with some centered text in it. When I programmatically update
Share
The title of a UIButton should be set using the setTitle:forState: method.