标签图标未显示

我正在设置标签导航器,并且由于某些原因我的标签图标未显示。这只是另一个似乎可以正常工作的Tab导航移动应用程序的提升。 (貌似)已使用Cocoapods正确下载了该程序包

我正在使用React Native .60 +,React Navigation v4和React Native矢量图标(离子子)。

帮助!

const TabNavigator = createBottomTabNavigator(
  {
    Routine: Routinestack,Habits: HabitsStack,Settings: SettingsStack,},{
    initialRouteName: 'Routine',{
    defaultNavigationOptions: ({ navigation }) => ({
      tabBarIcon: ({ focused,tintColor }) => {
        const { routeName } = navigation.state;
        let IconComponent = Ionicons;
        let iconName;

        if (routeName === 'Routine') {
          (Platform.OS === 'android' ? iconName = 'md-menu' : iconName = 'ios-menu');
        }
        else if (routeName === 'Habits') {
          (Platform.OS === 'android' ? iconName = 'md-stats' : iconName = 'ios-stats');
        }
        else if (routeName === 'Settings') {
          (Platform.OS === 'android' ? iconName = 'md-settings' : iconName = 'ios-settings');
        }
        return <IconComponent name={iconName} size={25} color={tintColor} />;
      },}),tabBarOptions: {
      activeTintColor: 'rgb(86, 177, 121)',inactiveTintColor: 'gray',}
);


chen192 回答:标签图标未显示

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3149503.html

大家都在问