ios - Set background image of Button in Objective-C -


i problem cannot set background image uibutton. button colour button , want have image @ background of button. , also, can increase size of background image. code is:

in .h

@property (weak, nonatomic) iboutlet uibutton *color1; 

in .m

uiimage *colorimage = [uiimage imagenamed:@"57_bg_selected"]; [_color1 setbackgroundimage:colorimage forstate:uicontrolstatenormal]; 

what got background image step on button.

button should of custom type set image. verify code once again. set button custom type in storyboard.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -