By default, macOS11.0 Big Sur set the "reduce transparency" to true on Accessibility. That makes the light status menu almost the same as the dark one, thus make the setting of my app's status menubar icon becomes a challenge.
On iOS, a simple UIKit function could do the trick:
if (UIAccessibilityIsReduceTransparencyEnabled()){
//use the icon for dark mode although we are in light mode now
}
But there is no way to implement it on macOS although the Apple documentation indicated the Availability is iOS 8.0+ and macOS Catalyst 13.0+
Any ideas? Thank you!
You can use the
defaults read com.apple.universalaccess reduceTransparency
command. It's1
if it's enabled, and0
if it's not. In Objective-C that looks something like this: