iphone - Drawing a custom button -


i drawing custom button:

uibutton *mybutton = [uibutton buttonwithtype:uibuttontypecustom]; mybutton.frame = cgrectmake(10,10,44,70); [mybutton settitlecolor:[uicolor whitecolor] forstate:uicontrolstatenormal]; [mybutton settitle:@"order" forstate:uicontrolstatenormal];                    

when tapping on button ground color not changing. need use different images normal , selected state? trick here?

yes, need use different images different states:

[mybutton setbackgroundimage:someuiimageref forstate:uicontrolstatenormal]; [mybutton setbackgroundimage:someotheruiimageref forstate:uicontrolstatehighlighted]; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -