首页 > 解决方案 > 为什么图标没有显示在 createMaterialTopTabNavigator 中?

问题描述

在此处输入图像描述

const RootNavigation = createMaterialTopTabNavigator({

Page1: {screen: Page1,
  navigationOptions:{
    tabBarLabel:'Page4',
    tabBarIcon: () => (
      <Icon name="roket" color={tintColor} size={24}></Icon>

    )
}},

标签: react-native

解决方案


Ionicons 包没有“roket”图标。你把名字传错了。

尝试这个:

<Icon name="rocket" color={tintColor} size={24}></Icon>

您可以在此处搜索图标:https ://ionicons.com/


推荐阅读