我有一个隐藏在滚动条上的标题,所以我用来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},
Run Code Online (Sandbox Code Playgroud)
PS:当我使用 contentContainerStyle 和 contentInset 时,refreshcontrol 和内容之间有一个空格...