5

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

Praveena
  • 6,340
  • 2
  • 40
  • 53

1 Answers1

13

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.

Roban Reuvers
  • 216
  • 2
  • 9