0

我在使用 react-native-modals 的 Swipe 模型中遇到滚动视图问题。问题出在 Android 中,滚动流畅且运行良好。然而,iOS 的滚动量很小,它滚动的量很小,然后就停止了,这意味着我必须在屏幕上重复滚动 10 次才能查看只有少量内容的底部。这是模型的代码。

 <Modal
propagateSwipe={true}
visible={this.props.visible}
useNativeDriver={true}
modalAnimation={
  new SlideAnimation({
    initialValue: 0, // optional
    slideFrom: 'bottom', // optional
    useNativeDriver: false, // optional
  })
}
style={stylesSwipeCard.modal}
rounded={true}
modalStyle={[
  stylesSwipeCard.customModal,
  this.props.customModalStyle,
  {maxHeight: height * this.props.height},
]}
onTouchOutside={() => this.props.closeModal(false)}
swipeDirection={['down']} // can be string or an array
swipeThreshold={100} // default 100
onSwipeOut={(event) => {
  this.props.closeModal(false);
}}
containerStyle={stylesSwipeCard.modalContainer}
footer={this.props.hasFooter && this.props.footerContent}>
<ModalContent style={stylesSwipeCard.modalContent}>
  <View
    style={[stylesSwipeCard.container, this.props.modalContainerStyle]}>
    <Image source={line_swipe} style={{alignSelf: 'center'}} />

    <ScrollView>
      <TouchableHighlight>
        <TouchableWithoutFeedback>
          <View>{this.props.children}</View>
        </TouchableWithoutFeedback>
      </TouchableHighlight>
    </ScrollView>
  </View>
</ModalContent>

模态内容截图

我将不胜感激任何帮助或建议。谢谢

4

0 回答 0