【发布时间】:2017-08-05 10:32:54
【问题描述】:
我正在尝试更改我的活动标签标题颜色,我尝试使用 tabBarOptions 但它不起作用,我做错了什么? 这是我的代码:
Home:{
screen: TabNavigator({
Home: {
screen: HomeScreen,
navigationOptions: ({ navigation }) => ({
title: 'Home',
tabBarIcon: ({ tintColor, focused }) => (
<Ionicons
name={focused ? 'ios-home' : 'ios-home-outline'}
size={26}
style={{ color: focused ? `${tabBarColor}` : tintColor}}
/>
),
header: null,
}),
},
Profile: {
screen: ProfileScreen,
navigationOptions: ({ navigation }) => ({
title: 'Profile',
tabBarIcon: ({ tintColor, focused }) => (
<Ionicons
name={focused ? 'ios-people' : 'ios-people-outline'}
size={26}
style={{ color: focused ? `${tabBarColor}` : tintColor }}
/>
),
header: null,
}),
},
}),
tabBarOptions:{
activeTintColor: `${tabBarColor}`,
}
}
我阅读了文档并搜索了示例,但找不到任何对我有用的东西。 这就像应用程序只是忽略了 tabBarOptions。
提前致谢!
【问题讨论】:
标签: react-native