NavigationOptions标头上无法设置样式图标

时间:2018-06-30 19:06:24

标签: react-native

我对本机响应还很陌生,您能否在“导航”选项中不设置图标的样式?并且只能调用其属性以对其进行样式化。

代码

   static navigationOptions = ({ navigation }) => {
    return {
        title: 'Terms of Services',
        headerLeft: <Icon name="menu" style={styles.navHeaderTint} onPress={() => navigation.navigate('DrawerOpen')} />,
        headerStyle: styles.navHeaderBG,
        headerTitleStyle: styles.navHeaderTitle,
        headerTintColor: styles.navHeaderTint,
        drawerIcon: ({ tintColor }) => (
            <Image
                source={require('../images/icons/ic_view_headline_black_24dp.png')}
            />
        ),
    }
};

样式

navHeaderTint:{
   paddingLeft: 10,
   color: '#fff'
},

0 个答案:

没有答案