react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Prop for ending pinching gesture when one finger is lifted (iOS)

Open iqqmuT opened this issue 4 years ago • 0 comments

Description

Fixes #1214.

Probably the maintainers don't want to alter the native iOS behavior with this PR, but this fork can be useful for those who want to avoid writing workarounds.

This fork adds a new boolean prop for PinchGestureHandler (iOS only): twoPointersRequired

  • false (default): no change for behavior; lets UIPinchGestureRecognizer end the gesture when the user lifts off both fingers from the view
  • true: end the gesture when the user lifts off one finger from the view

Test plan

Tested on iPhone 6s Plus.

<PinchGestureHandler twoPointersRequired={true}>
  ...
</PinchGestureHandler>

iqqmuT avatar Feb 28 '21 18:02 iqqmuT