在 React Native 中旋转多点触控手势

Rotating Multitouch Gesture in React Native

使用 React Native 时是否有任何 limitations/drawbacks 多点触控手势?

例如,我想通过按住并在相反方向上拖动两根手指来旋转屏幕上的某个项目:

看看这个react-native-easy-gestures

import Gestures from 'react-native-easy-gestures';

/**
 * Another example:
 * Drag only on x axis;
 * Scale from 0.1 to 7;
 * Do not rotate;
 * On release callback;
 */
<Gestures
  draggable={{
    y: false,
  }}
  scalable={{
    min: 0.1,
    max: 7,
  }}
  rotatable={false}
  onEnd={(event, styles) => {
    console.log(styles);
  }}
>
  <Image
    source={photo}
    style={{
      width,
      height,
    }}
  />
</Gestures>