首页 > 解决方案 > 如何在反应原生的任何视图上滚动滚动视图?

问题描述

我在它下面有一个视图和滚动视图..而且我需要滚动视图能够滚动到上面的视图..我怎样才能用本机反应来实现?请帮我..

标签: react-nativescrollview

解决方案


ScrollView works only with the specified childs如果你也想滚动上面的视图,你有两个选择。

  1. Replace that View with ScrollView(嵌套滚动)。

  2. Put your inner ScrollView at root level并且将使用单个 ScrollView。

     <View>               // Either replace this View with ScrollView.
        <ScrollView>     // Or move this ScrollView to the top. 
           // You content
        </ScrollView>
     </View>
    

推荐阅读