Skip to content

scull06/rn-gestures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Physical gestures

Getting started

$ npm install rn-ph-gestures --save

Mostly automatic installation

$ react-native link rn-ph-gestures

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesrn-ph-gestures and add RNGestures.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNGestures.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Usage

import RNGestures from 'rn-ph-gestures';

//Registering Listener
RNGestures.registerMovementDetection(3, 2000);

//Unregistering Listener
 RNGestures.stopMovementDetection();

//Listening events
DeviceEventEmitter.addListener("MOVING", () => {
    // Do your stuff
});

DeviceEventEmitter.addListener("STATIONARY", () => {
    // Do your stuff
});

About

React Native Psychical Gestures Module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published