gpt4 book ai didi

react-native - 如何在 TabNavigator 中隐藏 TabBar 文本?

转载 作者:行者123 更新时间:2023-12-04 04:01:38 27 4
gpt4 key购买 nike

我正在使用'react-navigation'中的TabNavigator。我想隐藏或删除图标下的文本。

enter image description here

这是 TabNavigator 的一部分。 (我正在使用世博会)

    Camera: {
screen: CameraScreen,
},
Noti: {
screen: NotificationScreen,
},
Menu: {
screen: MenuStackNavigator,
},
},
{
navigationOptions: ({ navigation }) => ({
header: null, <<<
tabBarIcon: ({ focused }) => {
...
},
}),
header: null, <<<-
headerMode: 'none', <<--
tabBarComponent: TabBarBottom,
tabBarPosition: 'bottom',
animationEnabled: false,
swipeEnabled: false,
backBehavior: 'none',

这是 CamaraScreen
class CameraScreen extends Component {
static navigationOptions = {
title: 'Camera'
}

最佳答案

您可以通过指定 showLabel: false 隐藏标签为 tabBarOptions目的:

backBehavior: 'none',
tabBarOptions: {
showLabel: false
}

关于react-native - 如何在 TabNavigator 中隐藏 TabBar 文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46255973/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com