我正在尝试添加一个顶部标签栏,当我在我的发现标签时可见。我该怎么做呢?感谢您的帮助!这就是我设置底部标签栏的方式:
export const Tabs = TabNavigator({
Discover: {
screen: DiscoverScreen,
navigationOptions: {
tabBar: {
label: "Discover",
icon: ({tintColor}) => <Icon name="list" size={20} color={tintColor}/>
}
},
},
Tickets: {
screen: TicketScreen,
navigationOptions: {
tabBar: {
label: "Tickets",
icon: ({tintColor}) => <Icon name="photo" size={20} color={tintColor}/>
}
},
},
MyProfile: {
screen: MyProfile,
navigationOptions: {
tabBar: {
label: "Profile",
icon: ({tintColor}) => <Icon name="account-circle" size={20} color={tintColor}/>
}
},
},
}, {
tabBarComponent: NavigationComponent,
tabBarPosition: 'bottom',
tabBarOptions: {
bottomNavigationOptions: {
labelColor: 'red',
rippleColor: 'white',
tabs: {
Discover: {
barBackgroundColor: '#37474F'
},
MyProfile: {
barBackgroundColor: '#00796B'
},
}
}
} });