ScrollView中的边界高度是多少?

Gre*_*een 5 markup layout react-native yoga-x1

这是什么意思?(https://facebook.github.io/react-native/docs/scrollview

请记住,滚动视图必须具有一定的高度才能工作

谁必须拥有所谓的边界高度ScrollView本身?还是它的父母?还是它的孩子?

<SafeAreaView style={{height: ...}}> <= this?
    <ScrollView style={{height: ...}}> <= this?
        <View style={{height: ...}}> <= this?
            ....
        </View>
    </ScrollView>
</SafeAreaView>
Run Code Online (Sandbox Code Playgroud)

小智 0

据我所知 ScrollView 父级的高度。

<SafeAreaView style={styles.container}>
  <ScrollView style={styles.scrollView}>
     ......
     ......
  </ScrollView>
</SafeAreaView>

const styles = StyleSheet.create({
     container: {
       flex: 1,
     },
Run Code Online (Sandbox Code Playgroud)