I add the following code to every VCTest:
let popGestureRecognizer = self.navigationController!.interactivePopGestureRecognizer!
if let targets = popGestureRecognizer.value(forKey: "targets") as? NSMutableArray {
let gestureRecognizer = UIPanGestureRecognizer()
gestureRecognizer.setValue(targets, forKey: "targets")
self.view.addGestureRecognizer(gestureRecognizer)
}
This allows me to swipe from anywhere on the screen back to the base viewcontroller (child of navigation controller) from anywhere on the screen.
When however I leave to a non-navigationcontroller controller, and then return, swiping on the screen all of a sudden does not work. Litteraly nothing is interactable.
Why is this happening and how can I solve this?