Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS13 status bar has now 3 styles #26294

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions React/Modules/RCTStatusBarManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,25 @@
#if !TARGET_OS_TV
@implementation RCTConvert (UIStatusBar)

#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
gaodeng marked this conversation as resolved.
Show resolved Hide resolved
__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0

RCT_ENUM_CONVERTER(UIStatusBarStyle, (@{
@"default": @(UIStatusBarStyleDefault),
@"light-content": @(UIStatusBarStyleLightContent),
@"dark-content": @(UIStatusBarStyleDefault),
@"default": @(UIStatusBarStyleDefault),
@"light-content": @(UIStatusBarStyleLightContent),
@"dark-content": @available(iOS 13.0, *) ? @(UIStatusBarStyleDarkContent):@(UIStatusBarStyleDefault)
}), UIStatusBarStyleDefault, integerValue);

#else

RCT_ENUM_CONVERTER(UIStatusBarStyle, (@{
@"default": @(UIStatusBarStyleDefault),
@"light-content": @(UIStatusBarStyleLightContent),
@"dark-content": @(UIStatusBarStyleDefault)
}), UIStatusBarStyleDefault, integerValue);

#endif

RCT_ENUM_CONVERTER(UIStatusBarAnimation, (@{
@"none": @(UIStatusBarAnimationNone),
@"fade": @(UIStatusBarAnimationFade),
Expand Down