gpt4 book ai didi

ios - iOS 中的 React Native RefreshControl 在下拉时显示一条白线

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

在iOS中,拉起<ScrollView>会出现一条白线与 refreshControl ,有谁知道原因吗?

<ScrollView
removeClippedSubviews={true}
showsVerticalScrollIndicator={false}
refreshControl={
<RefreshControl
refreshing={props.listViewState.pullToRefresh}
onRefresh={handleOnRefresh}
/>
}
contentContainerStyle={{backgroundColor: 'white'}}
>
<View> ... </View>
<View> ... </View>
</ScrollView>

white line appears

最佳答案

我对 Flatlist 也有同样的问题。尝试像 this 这样的东西.

  return (
<SafeAreaView style={styles.container}>
<View style={styles.container2}/>
<FlatList
data={DATA}
renderItem={renderItem}
keyExtractor={item => item.id}
contentContainerStyle={{ backgroundColor: 'white' }}
ListHeaderComponent={<View>
<Text style={{backgroundColor:'#293541'}}>HEADER</Text></View>}
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={onRefresh}
tintColor={'red'}
backgroundColor={'#293541'}
/>
}
/>
</SafeAreaView>
);

和样式:

container: {
flex:1,
marginTop: StatusBar.currentHeight || 0,
backgroundColor: 'white',
},
container2: {
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '60%',
backgroundColor: '#293541',
},

关于ios - iOS 中的 React Native RefreshControl 在下拉时显示一条白线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67263610/

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