I believe barButtonItem is read-only. (I'm not too sure about this, someone correct me if I'm wrong)
To give a tint colour to these buttons, this is what I would do:
In your App Delegate, add these lines of code:
UIBarButtonItem *barButtonAppearance = [UIBarButtonItem appearance];
[barButtonAppearance setTintColor:[UIColor redColor]]; // Change to your colour
The first line sets an appearance proxy, so I believe this works too, if you like less code:
[[UIBarButtonItem appearance] setTintColor:[UIColor redColor]];
I hope this works for you! (This changes all instances of UIBarButtonItem)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…