gpt4 book ai didi

ios - RefreshControl 有时不会隐藏并且在 iOS 上表现得很奇怪

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:55:42 34 4
gpt4 key购买 nike

react-native@0.26 升级后,RefreshControl 的事件指示器有时会出现在 iOS 上的 ScrollView 的右上角。我按照文档所述正确使用 RefreshControl:

...
<ScrollView
style={styles.container}
refreshControl={
<RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this.onPullToRefresh}
/>
}>
<View>
...
</View>
</ScrollView>
...

这是有时不刷新时发生的情况:

enter image description here

现在我正在运行 react-native@0.30.0,这个指标仍然让我很烦。

我是唯一面临这个问题的人吗?

最佳答案

通过将背景设置为透明色解决...

...
<ScrollView
style={styles.container}
refreshControl={
<RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this.onPullToRefresh}
style={{backgroundColor: 'transparent'}}
/>
}>
...

关于ios - RefreshControl 有时不会隐藏并且在 iOS 上表现得很奇怪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38625100/

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