如何在 React Native 中从屏幕上的任何位置滚动 ScrollView?
我用 React Native 构建了一个轮播。现在,即使我的手指没有放在里面,我也希望能够滚动它。我怎样才能实现这个目标?
I built a carousel in react native. Now I want to be able to scroll through it even when my finger is not placed inside it. How can I achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试获取坐标并检查方向是否发生变化。如果向左或向右,则触发滑动。
伪代码:
这可能有帮助:React本机获取我的触摸事件的坐标
Try to get the coordinates and check the direction if they change. if left or right, trigger swipe.
pseudocode:
may this helps: React native get the coordinates of my touch event