I am trying to change the background colour of the status bar, in iOS, when the app goes in background to let the user know that the app is running in the background.but no success so far.
My code looks like that:
function _handleAppStateChange(nextAppState) { if (this.state.appState.match(/inactive|background/) && nextAppState === "active") { Navigation.mergeOptions(component.id, { statusBar: { visible: false, } }); }else if(this.state.appState.match(/active/) && nextAppState === "inactive"){ Navigation.mergeOptions(component.id, { statusBar: { visible: true, backgroundColor: 'yellow', } }); } this.setState({ appState: nextAppState });};
If it is not possible to do it via react-native-navigation, would it be possible with objective-c?
Thanks in advance for you help!