colorizing UIbuttons
Does someone know how to colorize a UIButton (iphone)? I have a greyscale image with alpha that I want to colorize to various different colors. Setting things like background color only sh开发者_运维问答ade the entire image without respecting the alpha.
Is there a straightforward way to do this, or will I need to subclass UIButton and overload the drawRect method perhaps? Thanks.
One option is to use a one-segment UISegmentedControl
, which provides access to a tint property. These can behave like a UIButton
with the right settings, and look a lot like the glass-style that Apple uses for its iPhone apps.
精彩评论