React Native 中的偏移 RefreshControl

Max*_*hke 8 javascript scrollview react-native

编辑: React Native 中似乎存在一个错误。我在 GitHub 上创建了一个错误。对于每个寻求解决方案的人:目前似乎没有。

https://github.com/facebook/react-native/issues/23988

——————

我正在使用半透明的标题,这就是为什么我给了ScrollViewapaddingTop来抵消内容。当我下拉刷新时,微调器仍在顶部。

我试图用来contentInset={{ top: 80 }}抵消一切,但在 iOS 上存在一个问题,它有时无法正确拾取并设置为0.

有没有其他方法可以让 RefreshControl 开始降低?

在此处输入图片说明

这是我的组件:

  <Animated.ScrollView
    scrollEventThrottle={1}
    onScroll={Animated.event(
      [{ nativeEvent: { contentOffset: { y: this.state.scrollY } } }],
      { useNativeDriver: true },
    )}
    contentInset={{ top: headerHeight() + 10 }}
  >
Run Code Online (Sandbox Code Playgroud)

kod*_*usz 2

您是否为style或设定了填充contentContainerStyle

您能否提供一些代码片段,您的 ScrollView 有哪些属性以及所包装的内容?