【发布时间】:2020-09-28 16:36:17
【问题描述】:
尝试使用 React Native PanResponder 制作 swiper。当我在释放按钮从开始位置开始后再次单击按钮时。我尝试在 onPanResponderGrant 中使用 setOffset ,但这会使按钮在滚动时超出父容器。如果 sser 滚动了 45% 的容器一半宽度,我将动画按钮设置到该一半结束。
这是我的代码的链接 https://snack.expo.io/@sargnec/react-native-swiper
【问题讨论】:
标签: react-native animation swiper panresponder