How to detect dark mode in Yosemite to change the status bar menu icon

前端 未结 3 1287
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-23 12:27

The status bar app icon has to be changed when dark mode is enabled in Yosemite. How to detect if dark mode has been enabled ? Is there any notification for the same ?

3条回答
  •  伪装坚强ぢ
    2020-12-23 12:38

    The Status bar icon needs to be a template image. Just set the setTemplate:Yes to NSImage. And when switched to dark mode , the vibrancy should apply.

提交回复
热议问题