Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to trigger the UITapGestureRecognizer in Swift through Javascript in React Native?

$
0
0

I have a React Native app that imports a component written in Swift. While the component displays fine, none of the touch events (that worked in the standalone iOS version) work. Currently, my code is organised as follows:

A ViewController that contains the view logic is exposed to React through a UIView class that is exported using RCT_EXTERN_MODULE. The ViewController is where I have put the function to handle the tap gesture. On the React-Native side, I have a sub class of React.Component that renders the view. The view is wrapped in a TouchableWithoutFeedback tag but I assume that also requires a reference to a function that calls my native code, which I am not sure how to provide.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>