I received this error from Apple at the time of publication of my application. how can I solve this problem? We found that when Dark Mode is enabled, the menu bar extra icons aren't visible. I can not find anything online to define Dark mode...
I received this error from Apple at the time of publication of my application. how can I solve this problem? We found that when Dark Mode is enabled, the menu bar extra icons aren't visible. I can not find anything online to define Dark mode...
I see the term
cache
in your code and taking some guesses:It looks like you are loading the images, then manipulating them and storing the manipulated images for later use. There are a number of things you need to take care of:
First of all, make sure the current appearance is set correctly when you do your image loading/manipulation. Outside of
drawRect:
and a few other methods, you always need to do a dance similar to this:Be aware that the appearance is "scoped" to a specific view! You can have different appearances in the same view hierarchy.
You need to either override
viewDidChangeEffectiveAppearance
of yourNSView
or KVObserve theeffectiveAppearance
of a view to get notified about appearance changes and react accordingly (recreate your icons).