【问题标题】:Create React native elements with a touch event使用触摸事件创建 React 原生元素
【发布时间】:2019-01-08 20:29:04
【问题描述】:

我需要创建一个带有事件触摸和这个触摸位置的 View 元素。感谢您的帮助。

onStartShouldSetResponder={() => { createElement(element, postion) }}

【问题讨论】:

    标签: javascript reactjs react-native mobile touch


    【解决方案1】:

    你不能触摸 View 组件

    试试 TouchableOpacity

    TouchableOpacity · React Native - Facebook 开源 https://facebook.github.io/react-native/docs/touchableopacity

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-10
      • 2017-09-10
      • 2016-03-14
      • 2011-12-10
      • 1970-01-01
      相关资源
      最近更新 更多