changing title of UIButton not working
ios, uibutton
Solution
Use your code as this :
Objective-C:
-(IBAction)pressHonkBtn:(id)sender
{
UIButton *tempBtn = (UIButton *)sender;
[tempBtn setTitle:@"YOUR_TITLE" forState:UIControlStateNormal];// YOUR_TITLE is your button title
[tempBtn setTitle:@"YOUR_TITLE" forState:UIControlStateHighlighted];
}
Swift:
someUIButton.setTitle("String To Set", forState: UIControlState.Normal)
Hope it helps you.
Problem
I have added a button in tableview cell. My problem is this when I change its title on calling method `pressHonkBtn:(id)sender` it's not changing its title. How to solve this.