I use ViewController for a pop. Added tap to close the window to the main View
let viewTap = UITapGestureRecognizer(target: self, action: #selector(dismissSelf)) view.addGestureRecognizer(viewTap) @objc func dismissSelf() { self.dismiss(animated: false, completion: nil) } How to disable the triggering tapa when clicking on the View lying on top?