I need to implement a feature that will invoke some code when I double tap on the self.view (view of UIViewCotroller). But the problem that I have other UI obje
And for the Swift variant:
func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldReceiveTouch touch: UITouch) -> Bool {
if touch.view.isDescendantOfView(yourSubView){
return false
}
return true
}
Good to know, isDescendantOfView returns a Boolean value indicating whether the receiver is a subview of a given view or identical to that view.