开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜