You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 17, 2023. It is now read-only.
While testing my application (which makes use of your project), I found out that if dark mode is enabled on the iOS device, the theme setting is completely ignored and defaults to dark mode (white status bar icons).
In order to fix this, I made the following modifications to statusbar_ios.mm:
// Includes and @interface
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
// Other functions, etc
static UIStatusBarStyle statusBarStyle(StatusBar::Theme theme)
{
if (theme == StatusBar::Dark)
return UIStatusBarStyleLightContent;
else if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"13.0"))
return UIStatusBarStyleDarkContent;
else
return UIStatusBarStyleDefault;
}
However, while my solution works for my test-scenario, I really doubt that my fix is the most elegant or appropriate (I never really worked with iOS/Xcode/Objective-C before). By the way, the SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO definition was copy-pasted from StackOverflow.