【发布时间】:2019-07-10 11:13:51
【问题描述】:
我有隐藏在滚动条上的标题,所以我使用ProgressViewOffset 在标题下方显示刷新控制加载器。
它在 Android 上运行良好。但在 IOS 中,我们不支持偏移量。但我最终使用了 contentInset 和 contentOffset 但我没有得到它。
refreshControl: (
<RefreshControl
// refreshing
refreshing={this.props.isloading}
onRefresh={this.onRefresh}
progressViewOffset={200}
/>
),
contentInset: {top: 200},
onMomentumScrollBegin,
onMomentumScrollEnd,
onScrollEndDrag,
ItemSeparatorComponent: this.renderSeparator,
onScrollEventThrottle: 16,
automaticallyAdjustContentInsets: false,
contentOffset: {x: 0, y: -200},
PS:当我使用 contentContainerStyle 和 contentInset 时,refreshcontrol 和 content 之间有一个空格...
【问题讨论】:
-
您有什么解决方法吗?
-
是的。我确实找到了。我会尽快分享代码。
标签: ios react-native scrollview react-native-flatlist