cocoansbuttonnstoolbarnstoolbaritem

macOS : NSButton checkmark does not appear inside NSToolbar


I have a NSButton inside a NSToolbarItem as a member of a NSToolbar in my mac application. Something like these:

enter image description here

These two checkmarks are ON but they don't appear.

If I click on any of these, they toggle (the code runs) but the checkmarks never appear.

These were working on previous versions of macOS but not anymore on mojave. Anyway I am compiling this code to 10.12.

This is the storyboard structure:

enter image description here

Any ideas?


Solution

  • Embed your checkmark button in a NSView and it will work.