iphone - How to tint UIBarButtonItem background color? -


I have a UIToolbar that has 2 buttons in the toolbar, a tint:

  Toolbar .intColor = [UIColor colorWithRed: (102.0 / 255.0) Green: (20.0 / 255.0) Blue: (11.0 / 255.0) Alpha: 1];  

How do I make the button a similar tint color?

I found this solution better for those listed here: Contrary to the accepted answer, it gives you UIBarButtonItems Color allows to be separated from the UINavigationBar.

If the link goes down in the future, its essence is that you create UIBarButtonItem by using a tinted UISegmentedControl (UISegmentedControlStyleBar) with a segment, then using it as a custom view.

In iOS 5, UIBarButtonItem has a tintcolor property.


Comments