Check out example codes for "using swipe gesture recognizer swift". It will help you in understanding the concepts better.

Code Example 1

@IBAction func swipeHandler(_ gestureRecognizer : UISwipeGestureRecognizer) {
    if gestureRecognizer.state == .ended {
        // Perform action.
    }
}

Learn ReactJs, React Native from akashmittal.com