Can I add a color button to UIToolbar?

It seems that I can not add any buttons containing colors in the UIToolbar, they are always replaced by a white mask. How to add color image to custom button in UIToolbar?

+3
source share
5 answers

Yes you can, but this is actually not a uibarbuttonitem.

here's the link.

http://fredandrandall.com/blog/2011/03/31/how-to-change-the-color-of-a-uibarbuttonitem/

PS.

If you want to have IBAction for this button, then call it on the valuechanged event.

+8
source

No, I don’t think you can directly. Sounds like it should be, as you said.

, , , .

+1

API . Apple , API, .

+1

UIApperance, . , .

[[UIToolBar appearance] setTintColor:[UIColor blueColor]]

UIToolBar .

+1

All Articles