ios - change UIButton text with another UIButton text (swift) -
my question how change uibutton's title uibutton's title. have 3 buttons , want exchange title button 1 , 3 each other when click on button 2.
look @ image , understand.
how can that?

i think it's simple.
just preserve 1 of text button in string , replace clicking on button.
let title1 = btn1.titlelabel!.text btn1.settitle(btn2.titlelabel!.text, forstate: uicontrolstate.normal) btn2.settitle(title1, forstate: uicontrolstate.normal) learn , apply code! hope helps you.

Comments
Post a Comment