react-native-gesture-handler
react-native-gesture-handler copied to clipboard
Prop for ending pinching gesture when one finger is lifted (iOS)
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>