Check out example codes for "swipe left to go back iphone swift". It will help you in understanding the concepts better.

Code Example 1

self.navigationController.interactivePopGestureRecognizer.delegate = self;
//and then implement
extension MyViewController:UIGestureRecognizerDelegate {
    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool {
        return true
    }
}

Learn ReactJs, React Native from akashmittal.com