首页指南参考教程

GestureHandler

提供用于处理复杂手势的 API 的库。

Android
iOS
Web

react-native-gesture-handler 是一个用于处理复杂手势的库。来自其 README:

¥react-native-gesture-handler is a library for handling complex gestures. From it's README:

该库提供了一个 API,可公开特定于移动平台的触摸和手势处理和识别的原生功能。它允许定义复杂的手势处理和识别逻辑,这些逻辑 100% 在原生线程中运行,因此具有确定性。

¥This library provides an API that exposes mobile platform-specific native capabilities of touch and gesture handling and recognition. It allows for defining complex gesture handling and recognition logic that runs 100% in the native thread and is therefore deterministic.

安装

¥Installation

Terminal
npx expo install react-native-gesture-handler

If you are installing this in an existing React Native app (bare workflow), start by installing expo in your project. Then, follow the additional instructions as mentioned by library's README under "Installation in bare React Native projects" section.

用法

¥Usage

有关 API 和用法的更多信息,请阅读 react-native-gesture-handler 文档

¥Read the react-native-gesture-handler documentation for more information on the API and usage.

Expo 中文网 - 粤ICP备13048890号