UIButton setText programmatically

Viewed 45142

I have about 10 UIButtons on xib file and want to setText programmatically

3 Answers

In Swift 3+:

button.setTitle("Button Title", for: .normal)

Otherwise:

button.setTitle("Button Title", forState: UIControlState.Normal)
Related