We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75775ca commit 88de79aCopy full SHA for 88de79a
React/CoreModules/RCTAppearance.mm
@@ -81,7 +81,11 @@ void RCTOverrideAppearancePreference(NSString *const colorSchemeOverride)
81
return RCTAppearanceColorSchemeLight;
82
}
83
84
- appearance = appearance ?: [NSAppearance currentAppearance];
+ if (@available(macOS 11.0, *)) {
85
+ appearance = appearance ?: [NSAppearance currentDrawingAppearance];
86
+ } else {
87
+ appearance = appearance ?: [NSAppearance currentAppearance];
88
+ }
89
NSAppearanceName appearanceName = [appearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
90
return appearances[appearanceName] ?: RCTAppearanceColorSchemeLight;
91
0 commit comments