uiview - How save properties of the UIButton -
i have 2 viewcontrollers. insert 1 uibutton ibaction on first viewcontroller. when push on button set name "play" after pushed can see "stop" - it's work great. when after pushed button set name "stop" , opened second viewcontroller , returned first viewcontroller can see set name "play". how save properties of button?
also tried topics it's not right me. used code if/else changed set name of button.
how did if/else code button? try use flag , set button text this:
if (isplaying == true) { [button settitle:@"stop" forstate:uicontrolstatenormal] } else { [button settitle:@"play" forstate:uicontrolstatenormal] }
and set isplaying true/false once button pressed. hope helps.
Comments
Post a Comment