react-native - 更新 pod 后,我收到此错误。无效的 UIAccessibilityTraits '选项卡'
问题描述
我正在使用 react-native-tab-view。我不确定这与此错误有关。
<TabView
bounces={false}
navigationState={this.state}
swipeEnabled={false}
renderScene={() => null}
renderTabBar={props => (
<TabBar
{...props}
indicatorStyle={{
backgroundColor: "#212121",
height: "100%",
width: "38%",
marginLeft: "5%"
}}
style={{ backgroundColor: "#FFD54F" }}
inactiveColor="#757575"
activeColor={"#212121"}
pressOpacity={0.9}
tabStyle={{
backgroundColor: "#FFD54F",
marginBottom: 3
}}
labelStyle={{ fontWeight: "bold" }}
/>
)}
onIndexChange={index => this.setState({ index })}
initialLayout={{
width: Dimensions.get("window").width
}}
/>
{pages}
上面的代码在更新之前工作。
当我使用 react-native-tab-view 进入屏幕时会发生此错误。
我该如何解决这个问题?
谢谢!
解决方案
这是版本问题。我刚刚重新安装了 react-native-tab-view@2.11.0。它奏效了!我希望这对其他人有用!
推荐阅读
- javascript - 如何在状态内的空对象上执行 setState?
- android - RxJava2 concat 运算符不返回适当的序列
- google-sheets - 基于日期标准的动态匹配公式(G-sheets)
- wordpress - 限制评论数量 Wordpress
- python - 比较python数据框中2列的列表并计算相同的项目
- r - Shiny : 使编辑在可编辑数据表中的页面之间持续存在
- objective-c - 从日期字符串开始的一年中的某一天:2020 年 1 月 1 日的奇怪行为
- python - 为什么我的 Python 计时器类不起作用?
- gatsby - Netlify Deploy 从 babel-loader.js 失败
- css - 使用 '+' 选择器选择 :after 来自子级的伪