【问题标题】:How to remove screen names from a tab bar如何从标签栏中删除屏幕名称
【发布时间】:2021-05-03 22:54:51
【问题描述】:

我使用此标签栏在我的应用程序中导航,但我不知道如何删除图标下的名称,有什么提示吗?

【问题讨论】:

  • 您没有提供有关您如何实现该标签栏(库、版本、代码)的任何信息。

标签: react-native navigation expo


【解决方案1】:

在您的TabBar 配置中设置title=""。这不会显示标签。

查看工作示例here

<Tab.Navigator
      screenOptions={({ route }) => ({
      title: '', // This is the main part...
      tabBarIcon: ({ focused, color, size }) => GiveIcon({ route, focused, color, size }) })}
      tabBarOptions={{
      activeTintColor: 'tomato',
      inactiveTintColor: 'gray',
    }}>
    <Tab.Screen name="Home" component={HomeScreen} />
    <Tab.Screen name="Settings" component={SettingsScreen} />
  </Tab.Navigator>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-09
    • 2018-09-13
    • 2014-07-12
    • 2011-10-24
    • 1970-01-01
    相关资源
    最近更新 更多