StatusBarIOS has a method addListener
which allows us to listen for changes to the status bar height, like so:
StatusBarIOS.addListener('statusBarFrameWillChange', (statusBarData) => {
this.setState({statusBarHeight: statusBarData.frame.height});
});
StatusBarIOS is deprecated, with a message that the code has been merged into StatusBar
How can we listen for the statusBarFrameWillChange
event?