Disable receiving touches from parent view on subview
In the parent gesture recognizers, implement the UIGestureRecognizerDelegate
, and implement the following method:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([touch.view isKindOfClass:[ClassThatYouWantTouchesBlocked class]])
{
return NO;
}
else
{
return YES;
}
}
Replace ClassThatYouWantTouchesBlocked
with the class that you want its touches to be ignored.
What if never turn off the ChildView's tap gesture recognizer? if it is animating return from the child's tap gesture method without doing anything.
If it is an imageView than isAnimating property might come in use.