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

interactionType Unexpected results #49

Closed
nhart12 opened this issue Feb 12, 2016 · 2 comments
Closed

interactionType Unexpected results #49

nhart12 opened this issue Feb 12, 2016 · 2 comments

Comments

@nhart12
Copy link

nhart12 commented Feb 12, 2016

It seems that the interactionType handling should be reversed. I would assume BlockNoTouches would mean that no touches would be blocked, but in this case, every touch is blocked as seen by the hittest code.

if (self.interactionType == JGProgressHUDInteractionTypeBlockNoTouches) {
    return nil;
}
else {
    UIView *view = [super hitTest:point withEvent:event];

    if (self.interactionType == JGProgressHUDInteractionTypeBlockAllTouches) {
        return view;
    }
    else if (self.interactionType == JGProgressHUDInteractionTypeBlockTouchesOnHUDView && view != self) {
        return view;
    }

    return nil;
}
@JonasGessner
Copy link
Owner

It's the hitTest method of the HUD though. So if all touches should be blocked, the HUD captures the touch and nothing is passed to the views behind. If touches should be let through, the hitTest method returns nil, passing on the touch to the views below it.

I can see how it might appear confusing at first!

@nhart12
Copy link
Author

nhart12 commented Feb 12, 2016

ahh yes I knew that too. I just discovered my issue is that I'm showing the hud in a child container view, so it isn't blocking the touches in the parent

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

2 participants