static navigationOptions = {
    headerTitle:'Booking',
    headerTitleStyle: {color:'white'},
    headerStyle: {backgroundColor:'orange'}
  }

我的头球看起来像这样.我想更改IOS上默认后退按钮图标的 colored颜色 .我可以更改标题的 colored颜色 ,但没有选项更改图标的 colored颜色 .我想知道是否有办法改变 colored颜色 ,或者实现我自己的headerLeft属性是更好的 Select ?

推荐答案

navigationOptions中有一个属性headerTintColor,可用于更改后退按钮图标的 colored颜色

static navigationOptions = {
    headerTitle:'Booking',
    headerTitleStyle: {color:'white'},
    headerStyle: {backgroundColor:'orange'},
    headerTintColor: 'blue'
  }

参考:https://reactnavigation.org/docs/navigators/stack#headerTintColor

React-native相关问答推荐

在原生react 中更改图像源URI时闪烁

原生react :顶部的滑块位置

无法解析 com.google.gms:google-services:4.3.15

NPM INSTALL 在 react-native 项目上失败:无法解析 react 和 react-dom 的依赖树

如何在react native 中从 axios 重定向并将数据传递给路由

React Native Navigation const { navigate } = this.props.navigation;

如何在 React Native 中测量我的应用程序的数据使用情况?

React Native TextInput 没有获得焦点

Invariant Violation:Chrome 不支持在本机模块上调用同步方法

如何在react-native 中加密和解密文本?

使用 WSL2 运行时如何将手机连接到 expo

使用带有样式组件的动画

如何在样式组件之外获取主题?

react-native平面列表初始滚动到底部

React Native - 为什么执行这个函数?

KeyboardAvoidingView - 隐藏键盘时重置高度

react-native-webview :对于 iOS 文本太小

当前未启用语法nullishCoalescingOperator

react-native如何导入元素根目录?

如何在react-native中验证 TextInput 值?