static navigationOptions = {
headerTitle:'Booking',
headerTitleStyle: {color:'white'},
headerStyle: {backgroundColor:'orange'}
}
My header looks like this. I want to change the color of default back button icon on IOS. I can change the color of the title, but there's no option to change the color of icon. I was wondering if there's a way to change the color or implementing my own headerLeft property is a better option?
To configure the header bar of a React Native application, the navigation options are used. The navigation options are a static property of the screen component which is either an object or a function. headerTitle: It is used to set the title of the active screen. headerStyle: It is used to add style to the header bar.
There is a property headerTintColor in navigationOptions which can be used to change the back button icon color
static navigationOptions = {
headerTitle:'Booking',
headerTitleStyle: {color:'white'},
headerStyle: {backgroundColor:'orange'},
headerTintColor: 'blue'
}
Ref:https://reactnavigation.org/docs/navigators/stack#headerTintColor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With