【发布时间】:2016-04-13 17:49:00
【问题描述】:
https://facebook.github.io/react-native/docs/listview.html 说:
removeClippedSubviews bool用于提高大型列表滚动性能的性能优化, 在行容器上与
overflow: 'hidden'一起使用。
https://facebook.github.io/react-native/docs/performance.html 说:
removeClippedSubviews"当为 true 时,屏幕外的子视图(其溢出值被隐藏) 屏幕外时从其原生支持超级视图中删除。这个可以 提高长列表的滚动性能。默认值为 true."(0.14-rc版本之前默认为false)。
这是一个非常重要的优化,适用于大型 列表视图。在 Android 上,溢出值总是隐藏的,所以你不会 需要担心设置它,但在iOS上你需要确保设置
overflow: hidden在行容器上。
但什么是“行容器”?
<ListView renderRow={(r) => <Row r=r>}>
我是否需要将此overflow: hidden 应用于<ListView> 或<Row> 样式?
【问题讨论】:
标签: ios listview react-native