I have a subview and a superview. The superview has an UITapGestureRecognizer attached to it.

UIView *superview = [[UIView alloc] initWithFrame:CGRectMake:(0, 0, 320, 480);
UIView *subview = [[UIView alloc] initWithFrame:CGRectMake:(100, 100, 100, 100);
UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc] initWithTarget: self action: @selector(handleTap);
superview.userInteractionEnabled = YES;
subview.userInteractionEnabled = NO;
[superview addGestureRecognizer:recognizer];
[self addSubview:superview];
[superview addSubview:subview];

The recognizer is fired inside the subview as well, is there a way to exclude the recognizer from the subview?



I know this question has been asked before but I didn't find a good answer to it.

Edit
Report