How could I change the button title in swift?
I’ve tried the below code but it’s not working:
button.setTitle("myTitle", for: .Normal)
How could I change the button title in swift?
I’ve tried the below code but it’s not working:
button.setTitle("myTitle", for: .Normal)
2
Answers
// I Set button title in didload and further changed on button action
//button is so called as defaultButton
The both methods are working fine !!
if your button is an @IBOutlet and have proper attribute connection then the following line will work