How can I change navigatorStyle
property for example navBarBackgroundColor
dynamically at run time? For example in my app I want to change navigator background when user goes online :)
Only solution I have figured so far to hack this is to use resetTo
without animation. This is otherwise good but it rerenders the view :S
Not sure how to change it dynamically, but you could set it to transparent and have a View hooked up behind it which changes color?
I find write this in the render function
this.props.navigator.setStyle({})
can change the navigatorStyle dynamically on iOS , any way to do the same on Android ?
You can use setStyle
, available in 1.1.42
this.props.navigator.setStyle({
screenBackgroundColor: 'red',
navBarButtonColor: 'blue'
});
Most helpful comment
You can use
setStyle
, available in 1.1.42