ios - changing title of UIButton not working -
i have added button in tableview cell. problem when change title on calling method presshonkbtn:(id)sender it's not changing title.
how solve this.
use code :
objective-c:
-(ibaction)presshonkbtn:(id)sender { uibutton *tempbtn = (uibutton *)sender; [tempbtn settitle:@"your_title" forstate:uicontrolstatenormal];// your_title button title [tempbtn settitle:@"your_title" forstate:uicontrolstatehighlighted]; } swift:
someuibutton.settitle("string set", forstate: uicontrolstate.normal) hope helps you.
Comments
Post a Comment