KLCPopup
KLCPopup copied to clipboard
Subview doesnt pass the touch forward in case mask type is KLCPopupMaskTypeNone
`- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView* hitView = [super hitTest:point withEvent:event]; if (hitView == self) {
// Try to dismiss if backgroundTouch flag set.
if (_shouldDismissOnBackgroundTouch) {
[self dismiss:YES];
}
// If no mask, then return nil so touch passes through to underlying views.
if (_maskType == KLCPopupMaskTypeNone) {
return nil;
} else {
return hitView;
}
} else {
// If view is within containerView and contentTouch flag set, then try to hide.
if ([hitView isDescendantOfView:_containerView]) {
if (_shouldDismissOnContentTouch) {
[self dismiss:YES];
}
//Shouldn't this code exist here
if (_maskType == KLCPopupMaskTypeNone) {
return nil;
}
return hitView;
} }
`