feat(ios): add InAppBrowserStatusBarStyle 'darkcontent' configuration option (#828)
Co-authored-by: Tim Brust <github@timbrust.de>
This commit is contained in:
parent
07862603eb
commit
6b920849cc
@ -71,7 +71,7 @@ simply hook `window.open` during initialization. For example:
|
||||
### Preferences
|
||||
|
||||
#### <b>config.xml</b>
|
||||
- <b>InAppBrowserStatusBarStyle [iOS only]</b>: (string, options 'lightcontent' or 'default'. Defaults to 'default') set text color style for iOS.
|
||||
- <b>InAppBrowserStatusBarStyle [iOS only]</b>: (string, options 'lightcontent', 'darkcontent' or 'default'. Defaults to 'default') set text color style for iOS. 'lightcontent' is intended for use on dark backgrounds. 'darkcontent' is only available since iOS 13 and intended for use on light backgrounds.
|
||||
```
|
||||
<preference name="InAppBrowserStatusBarStyle" value="lightcontent" />
|
||||
```
|
||||
|
@ -1071,6 +1071,12 @@ BOOL isExiting = FALSE;
|
||||
NSString* statusBarStylePreference = [self settingForKey:@"InAppBrowserStatusBarStyle"];
|
||||
if (statusBarStylePreference && [statusBarStylePreference isEqualToString:@"lightcontent"]) {
|
||||
return UIStatusBarStyleLightContent;
|
||||
} else if (statusBarStylePreference && [statusBarStylePreference isEqualToString:@"darkcontent"]) {
|
||||
if (@available(iOS 13.0, *)) {
|
||||
return UIStatusBarStyleDarkContent;
|
||||
} else {
|
||||
return UIStatusBarStyleDefault;
|
||||
}
|
||||
} else {
|
||||
return UIStatusBarStyleDefault;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user