是否可以<ScrollView>在React Native中获取当前滚动位置或组件的当前页面?
所以类似于:
<ScrollView
horizontal={true}
pagingEnabled={true}
onScrollAnimationEnd={() => {
// get this scrollview's current page or x/y scroll position
}}>
this.state.data.map(function(e, i) {
<ImageCt key={i}></ImageCt>
})
</ScrollView>
Run Code Online (Sandbox Code Playgroud)