Question

The Designing Toolbar Icons' section of OS X Human Interface Guidelines says that the system applies effects on icons in the toolbar that change their appearance. In other words, we have to create a solid black icon like this:

Solid black icon

and the system displays it like this:

System processed icon

That's great, but it does not work for me.

I'm using Interface Builder. I have a Rounded Textured Button inside a NSToolbarItem:

Interface Builder Hierarchy

I have assigned a solid black icon to the toolbar item:

enter image description here

When I show it, however, it appears like a... solid black icon:

enter image description here

What am I doing wrong? This thing is driving me crazy.

Was it helpful?

Solution

Try to rename your icon from Test to TestTemplate. You can find more information about this trick in OS X Release Notes.

OTHER TIPS

If you are dealing with an NSImage object directly (not in Interface Builder) you can call [myImage setTemplate:YES] and it will exhibit the special drawing behavior.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top