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.
精彩评论