Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subview doesnt pass the touch forward in case mask type is KLCPopupMaskTypeNone #67

Open
puneetgoyal08 opened this issue Jan 27, 2017 · 0 comments

Comments

@puneetgoyal08
Copy link

`- (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;

}
}

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant