I'd like to use the shake gesture with React Native. Its currently used for the debug menu and i'm not sure how to override it. Does anyone know if this is possible?
How do i use the iOS shake gesture with react native?
4.7k Views Asked by Sebastian Roberts At
1
You can disable developer mode and then provide your own shake handler.
https://github.com/facebook/react-native/issues/1054
I think you would then have to implement an Obj-C extension that handles the shake gesture; AFAIK there's no way to do this purely in JavaScript. You may find the code for the Dev Menu a useful guide for this:
https://github.com/facebook/react-native/blob/98263c4f8f6365a8c0c25e5f509928b89d8f1c0c/React/Base/RCTDevMenu.m