macoscocoaappkitnstoolbarnstoolbaritem

How to change the color of a NSToolbarItem's label


I'd like to change the color of all of my NSToolbarItem's labels.

I need to set it to white because it suits better to the background color of my NSWindow, but it defaults to black and I haven't found a way to change it neither in Interface Builder nor directly by code (NSToolbarItem implements setLabel, but it just sets the text string).

If possible, I'd like to avoid:


Solution

  • In case anyone is interested, I solved it by:

    I had to deal with another problem related to a bug with Interface Builder: the custom view was not showing at all. I was able to fix it thanks to this answer.