0.2.1 • Published 8 years ago
react-native-gesture-view v0.2.1
GestureView
Detects swipes in any <View> element including the swipe direction.
Usage
You should use GestureView as a normal <View> element:
render () {
return (
<GestureView onSwipeUp={this.onSwipeUp}>
<Text>Swipe up for awesomeness</Text>
</GestureView>
)
}Props
onSwipeUpan optional function that's triggered when the view detects a swipe to theupdirectiononSwipeDownan optional function that's triggered when the view detects a swipe to thedowndirectiononSwipeLeftan optional function that's triggered when the view detects a swipe to theleftdirectiononSwipeRightan optional function that's triggered when the view detects a swipe to therightdirectiononUnhandleSwipean optional function that's triggered when the swipe was inside the thresholdswipeThresholdthe amount of pixels that the swipe needs to have before being interpreted as a swipe. Defaults to120quadrantThresholdan angle that's computed into each quadrant, use it to make wider/narrowed quadrants. Defaults to30