A simple problem but I can't find a solution for it:
I have 2 UIViews, one above the other in the same parent view. Both have GestureRecognizers
on them but only the top most is receiving the events. How can I make the top most view pass all the gestures he gets to the other UIViews beneath it?
This is how i pass touches...
Subclass the uiview and add
-(id)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitView = [super hitTest:point withEvent:event];
if (hitView == self){
return nil;
}
else {
return hitView;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With