Tired of the default iOS buttons? Yes, we too. Don’t want to spend hours of graphical design just to put a new button style? Nah, we neither.
About a year ago, Erica Sadun posted how to use the undocumented UIGlassButtons from iOS to generate a shinny button, and then copy it to be used as an image in your real buttons. The post is still accessible here: http://www.tuaw.com/2010/02/19/iphone-devsugar-create-shiny-buttons-easily/
But, what if you could avoid the pain of generating each button also and just select the color of the button on your code? We thought it wouldn’t be too hard to do it, and Juani (our star programmer) did it.
I just compiled his code in a project that will demonstrate how to use these buttons. The CrystalButton class is just a subclass of UIButton so all you have to do is use them like normal buttons (even in the Interface Builder) but be aware that now you have a new property to set: the tint color of the button.
@property (nonatomic, retain) UIColor * tintColor;
Without further delay, here is the CrystalButton sample: http://dl.dropbox.com/u/14713330/CrystalButtonsSample.zip
Play with it. Enjoy it. Tell us what you think.