tags:

views:

28

answers:

1

hi all,

How to set image as a background on a button programmatically???

code snippet plz.

regards shishir

+1  A: 
button.backgroundImage = [UIImage imageNamed:@"myImage"];
Philippe Leybaert
are u sure?bcoz, i cant c backgroundimage as a option in buttonit is giving me errorerror: request for member 'backgroundImage' in something not a structure or union"
shishir.bobby
Yes I'm sure. **button** has to be of type **"UIBUtton *"**
Philippe Leybaert
thanks man,my bad, i did a very tiny mistake.thanks its done....
shishir.bobby