在 React Native 中检测向左滑动 [英] Detect swipe left in React Native

查看:39
本文介绍了在 React Native 中检测向左滑动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 React Native 中检测整个屏幕上的向左滑动?

How can I detect a left swipe on the entire screen in React Native?

是否有必要使用 PanResponder 或者可以更容易地完成吗?

Would it be necessary to use PanResponder or can it be done a little more easy?

推荐答案

已有组件 react-native-swipe-gestures 用于处理向上、向下、向左和向右方向的滑动手势,见 https://github.com/glepur/react-native-swipe-gestures

There is an existing component react-native-swipe-gestures for handling swipe gestures in up, down, left and right direction, see https://github.com/glepur/react-native-swipe-gestures

这篇关于在 React Native 中检测向左滑动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆