I want to toggle the text of a button based on clicks - every time the button is clicked the title will change from textA to TextB and so on. but when I use button.titlelabel.text = @"blabla"
but the text stays the same.
This is worth a try:
-(IBAction)buttonClickEvent
{
[button setTitle:@"your title" forState:UIControlStateNormal];
}
- (void)setTitle:(NSString *)title forState:(UIControlState)state
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With