SyntaxFix
Write A Post
Hire A Developer
Questions
In Swift 3, 4, 5:
button.setTitle("Button Title", for: .normal)
Otherwise:
button.setTitle("Button Title", forState: UIControlState.Normal)
Also an @IBOutlet has to declared for the button.
@IBOutlet
button