I\'m writing a module that everytime I swipe on a view, two sub views with a half size of the view will be added. Those subviews have their own gestures (eg: pan,...). The f
Considering that I have a dialogView as a direct subview of my UIViewController's main view I'm attaching a gesture recognizer to the main view and do the following (setting my view controller as the gesture recognizer delegate):
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
let point = touch.location(in: view)
return !dialogView.frame.contains(point)
}