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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -