KLCPopup icon indicating copy to clipboard operation
KLCPopup copied to clipboard

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

Open puneetgoyal08 opened this issue 8 years ago • 0 comments

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

} }

`

puneetgoyal08 avatar Jan 27 '17 13:01 puneetgoyal08