将图像而不是字符串标题添加到react-native-segmented-control-tab

问题描述 投票:3回答:1

我在项目中使用react-native-segmented-control-tab,它工作正常。下面是我当前的代码

<SegmentedControlTab
                tabsContainerStyle={styles.tabsContainerStyle}
                tabStyle={styles.tabStyle}
                activeTabStyle={styles.activeTabStyle}
                values={["First", "Second", "Third"]}
                selectedIndex={this.state.selectedIndex}
                onTabPress={this.handleIndexChange}
              />

这将显示标题字符串为“ First,Second和Third”的句段。现在,我想用图像代替它们,而不是这些字符串。那可能吗?我该怎么办?

android ios react-native npm uisegmentedcontrol
1个回答
0
投票

[如果有人仍在寻找解决方案,请参考此处-https://github.com/pavan168/react-native-segmented-control-tabs

© www.soinside.com 2019 - 2024. All rights reserved.