iphone - Temporarily change a UIButtons image -
i have uibutton assign image in ib.
i change image in code, want temporary.
how 1 return button image set in ib or there way revert after doing temporary switch?
thanks
if want revert previous image have store reference somewhere:
// previmage ivar uiimage * previmage = [[mybutton imageforstate:uicontrolstatenormal] retain]; // change new image ... // later: revert previmage [mybutton setimage:previmage forstate:uicontrolstatenormal]; [previmage release]; previmage = nil;
Comments
Post a Comment