ios4 - UIButton Background Change on click -


can tell me how change uibutton background image?i have customtableview holding 4 buttons.it's quiz app.i want show if ans correct or not loading 2 background image.if correct green image , if wrong red image.

and when question loaded.reset them.it should happen in click.i done loading functionality , logical task of score counting.i need change button background image.can tell me how this?

you should able calling

[button setimage:[uiimage imagenamed:@"green.png"] forstate:uicontrolstatenormal]; 

or alternatively

[button setbackgroundimage:[uiimage imagenamed:@"green.png"] forstate:uicontrolstatenormal]; 

documentation reference:
setimage:forstate:
setbackgroundimage:forstate:


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -