[英]Create React native elements with a touch event
I need create a View element with a event touch and this touch position. 我需要创建一个具有事件触摸和此触摸位置的View元素。 Thanks for the help. 谢谢您的帮助。
onStartShouldSetResponder={() => { createElement(element, postion) }} onStartShouldSetResponder = {()=> {createElement(element,postion)}}
you cant touch the View component 你不能触摸视图组件
try TouchableOpacity 尝试TouchableOpacity
TouchableOpacity · React Native - Facebook Open Source https://facebook.github.io/react-native/docs/touchableopacity TouchableOpacity·React Native-Facebook开源https://facebook.github.io/react-native/docs/touchableopacity
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.