小编Gow*_*ham的帖子

用于 IOS 刷新控制 React Native 的 ProgressViewOffset

我有一个隐藏在滚动条上的标题,所以我用来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 和内容之间有一个空格...

scrollview ios react-native react-native-flatlist

2
推荐指数
1
解决办法
1951
查看次数