This may not be what you want. For example, if subview B is showing an introduction, you do not want a tap in it to be handled by view A.
One solution is to make view A a delegate of its gesture recognizer, and define a method:
-(BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
shouldReceiveTouch:(UITouch *)touch {
return touch.view == self;
}
In this way, the gesture recognizer will not recognize gestures happen in its subview.
No comments:
Post a Comment