Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 使用react本机手势处理程序将触摸事件传递给子视图_React Native_React Native Android_Gesture_React Native Ios - Fatal编程技术网

React native 使用react本机手势处理程序将触摸事件传递给子视图

React native 使用react本机手势处理程序将触摸事件传递给子视图,react-native,react-native-android,gesture,react-native-ios,React Native,React Native Android,Gesture,React Native Ios,我用它来处理我的手势用户做的应用程序 但是手势似乎没有按预期工作,或者某些功能似乎没有将手势事件传递给子视图 这是赫里拉西 <PanGestureHandler {...this.props} ref={this.panRef} onGestureEvent={this._onGestureEvent} onHandlerStateChange={this._onPa

我用它来处理我的手势用户做的应用程序

但是手势似乎没有按预期工作,或者某些功能似乎没有将手势事件传递给子视图

这是赫里拉西

              <PanGestureHandler
            {...this.props}
            ref={this.panRef}
            onGestureEvent={this._onGestureEvent}
            onHandlerStateChange={this._onPanHandlerStateChange}>
            <Animated.View
                onLayout={this._onLayout}
                style={[this.props.style,
                this.props.windowSize,
                this.props.isFullScreen ? {} : {
                    transform: [
                        { translateX: this._translateX },
                        { translateY: this._translateY },
                    ],
               }]}>
                    <View style={styles.wrapper}>       ----> Child View
                        {this.props.children}
                    </View>
            </Animated.View>
        </PanGestureHandler>

---->子视图
{this.props.children}
在本例中,整个视图使用平移手势进行包裹 此平移手势用于在屏幕空间周围移动视图

除了这个子视图之外,这里还将包含具有一些平移手势实现的视图。 如果此平移手势事件因外部平移手势而取消

是否有任何方法可以正确获取内部子视图的平移手势事件

我无法找到将这些家长手势事件传递给孩子并取消家长手势动作的任何解决方案

如果你需要更多关于整个问题的信息。。。请一定要问