my code
static get options () {
return {
topBar : {
noBorder: true,
visible: true,
drawBehind: true,
transparent: true,
translucent: true,
background: { color: 'transparent' },
elevation: 0,
}
};
}
still not work
[ENTER DESCRIPTION HERE - Please make sure to use the current [naming conventions](https://github.com/wix/react-native-navigation/issues/197)]
[FILL THIS OUT - It will be extremely helpful]
It is working fine for me.
Are you using SafeAreaView or something for the content?
Post your complete screen component with the styles
@birkir yes correct, i using SafeAreaView,
this code my root
return (
<Provider store={store}>
<SafeAreaView style={{flex: 1, backgroundColor: 'white'}}>
<ChildComponent {...this.props}/>
</SafeAreaView>
</Provider>
)
Yeah, dont use that, it's adding the space on top
just use {translucent: true }in Push Function
ex:
topBar: {
background:{
color:'transparent',
translucent:true
},
I am having the same problem. Adding the topBar styling options to every screen push works, but is not the prettiest solution.
I started having this issue when upgraded from 2.16.0 to 2.17.0 and then when I tried to get back to 2.16.0 the problem persisted, so I just kept the 2.17.0 version. Seems like the Navigation.setDefaultOptions({ options })
is not keeping the iOS topBar background color, because in android it works fine. Hope this issue can be resolved soon!!
In the meantime, adding the the necessary styling to every push works for me.