-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Closing React Native view controller with StatusBar will reset status bar font color #24083
Comments
Hi there, thanks for posting this issue! It looks like a bug specifically for brown field apps, caused by the The StatusBar component has been moved out of React Native core to a separate repo, where it will get the attention it deserves. @cpojer could you please use the migration script on this issue to move it there? |
This issue has been moved to rnc-archive/react-native-statusbar#16. |
Thanks for verifying! Is there a workaround that we can do right now to solve this problem? |
|
Looks like this is still unsolved and the repo this issue shifted to is now dead (rnc-archive/react-native-statusbar#28) Can we reopen this issue? |
I have had same problem here. My context: React native on existing app. After closing react native domain, It calls a native swift method to dismiss its viewController with react embed. After dismissing it, I did a DispatchQueue.main.asyncAfter + 0.1 sec and change the statusBar to lightContent again. (There is a blink doing on this way. But it works) If anyone solved the problem with another workaround, I would be glad to know how. |
Some Info
Integrated RN single view into existing iOS project. Doing a push presentation (not modal).
Existing iOS screen is using
light content
already (i.e. status bar text color is white).🐛 Bug Report
When going back to native app, status bar color always changes back to
default
(i.e. status bar text colour is black) when I renderStatusBar
.To Reproduce
1. Make sure your native app status bar at this point in time is already
lightContent
.2. Present a RN view controller via push. Notice how the status bar is still
light-content
(i.e. white text) because of theStatusBar
code (see code).3. Pop the RN view controller. Observe the color change bug in the status bar.
StatusBar
. Reload your app.I did not test if the problem exists if presenting modally, but I am pretty sure the issue is with
StatusBar
.Expected Behavior
Status bar color should remain unchanged when using
StatusBar
and closing RN view controller.Code Example
Render code:
Note that
nativeCloseVC
is a function that calls native to pop this view controller.Environment
The text was updated successfully, but these errors were encountered: