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

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -