Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wix-react-native-navigation v2 statusBar not working

I am trying react-native-navigation V2 but not able to change the status bar color.

Navigation.setDefaultOptions({
 statusBar: {
 visible: true,
 style: "dark",
 backgroundColor: "red"
},
topBar: {
 background: {
  color: COLOR.primaryColor
 },
 title: {
  text: "ExampleWix",
  fontSize: 22,
  color: "white"
 },
 visible: true
}
});

But this is working only on the action bar and nothing happening to the status bar and it remains white. I am using RN v= 0.54.2 and react-native-navigation = 2.0.2373

UPDATE

Update your RNN and you will be able to change status bar color

like image 925
Praveena Avatar asked Jun 23 '18 11:06

Praveena


1 Answers

A bit late, but for the people that came here from Google:

If you're using iOS. Be sure to set the View controller-based status bar appearance or UIViewControllerBasedStatusBarAppearance in the Info.plist to YES.

like image 83
Roban Reuvers Avatar answered Sep 28 '22 16:09

Roban Reuvers