How to change the text on a Button

You can set the title of a button depending on its control state. An unselected untoched button has a UIControlStateNormal, but Xcode will show you all the other options you have at your fingertips.

To access this property you need to create an IBOutlet on the button. If you also want the button to trigger an action you also have to define an IBAction.

[self.myButtonLabel setTitle:@"Your text here" forState:UIControlStateNormal];




Leave a Reply