开发者

How to change the background of a toolbar

How do I change the toolbar's backg开发者_StackOverflowround?


Why not just adjust the tintColor property? Or is changing the tint not good enough for your purposes?


There's one common technique, which is a giant hack, but it seems to work. Subclass UIToolbar and override -drawRect: and just have that draw whatever you want. You can then create instances of the subclass whenever you need a toolbar, and if you have a toolbar in a xib file then you can just select it and change the class to whatever your subclass is.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜