我有可移动的 panresponders 但我还需要单击一个以产生 onPress 事件。这可能吗?目前他们是<View>
元素,但如果我将它们更改为 <Touchableopacity>
或类似的东西会引发错误。好像只有<View>
元素可以动画吗?
最佳答案
在这里检查
https://github.com/facebook/react-native/issues/3082
onMoveShouldSetPanResponderCapture: (evt, gestureState) => {
返回 gestureState.dx != 0 && gestureState.dy != 0;
},
关于javascript - React Native panresponder 元素可点击?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35814484/