Tag: BOOL responds to self targe. com nbsp delegate des Select
Recently, in order to resolve a click on a child view, it still responds to the parent's attempted click event to discover an agent method on UITapGestureRecognizer:
-(BOOL) Gesturerecognizer: (Uigesturerecognizer *) Gesturerecognizer Shouldreceivetouch: (Uitouch *) touch
If no is returned, we can determine whether a view is in the view layer of its parent view, based on the Isdescendantofview: method. Take out the sub-view that we don't want to respond to, and if it contains this sub-view, it returns no, otherwise it is yes.
Specific wording:
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initwithtarget:self
Action: @selector (Removesubviews)];
Tap.delegate = self;
self.userinteractionenabled = YES;
[Self.alpha_back_view Addgesturerecognizer:tap];
-(BOOL) Gesturerecognizer: (Uigesturerecognizer *) Gesturerecognizer Shouldreceivetouch: (Uitouch *) touch{
if ([Touch.view IsDescendantOfView:self.tableView_back_view]) {
return NO;
}
return YES;
}
The IOS child view responds to the Click events of the parent view