React Native Sync Two Scrollviews

前端 未结 2 1996
一个人的身影
一个人的身影 2021-02-09 09:40

Is there a way in React Native to sync two or more scrollviews so they follow each other? I\'ve seen some implementations for objective-c but have no idea how to implement that

2条回答
  •  悲&欢浪女
    2021-02-09 10:19

    1. Get the scroll position when one of them is scrolled based on this answer
    2. Set the scroll position on the other one with ScrollView.scrollTo

提交回复
热议问题