Let say I have two simple animated view. I want to know which View
is getting panned. How do I pass any parameter to it or any other way to detect? Thanks
<Animated.View {...this._panResponder.panHandlers}></Animated.View>
<Animated.View {...this._panResponder.panHandlers}></Animated.View>
//passing parameters
<Animated.View {...this._PanResponder('pass parameter here 1').panHandlers}></Animated.View>
<Animated.View {...this._PanResponder('pass parameter here 2').panHandlers}></Animated.View>
//handler
panResponder = (receive parameter here) =>
PanResponder.create({
//code here
.
.
.
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With