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

iOS 14 canTapOutsideToDismiss not working #17

Open
1234Karthick opened this issue Dec 16, 2020 · 1 comment
Open

iOS 14 canTapOutsideToDismiss not working #17

1234Karthick opened this issue Dec 16, 2020 · 1 comment

Comments

@1234Karthick
Copy link

1234Karthick commented Dec 16, 2020

iOS 14 canTapOutsideToDismiss not working because of hierarchy change. Please check.

// MARK: - UIGestureRecognizerDelegate extension PopupViewController: UIGestureRecognizerDelegate { public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { guard let touchView = touch.view, canTapOutsideToDismiss else { return false } if containerView.bounds.contains(touch.location(in: containerView)) { return false } return !touchView.isDescendant(of: containerView) } }

This code will fix that issue, you can update project if you need.

@huynguyencong
Copy link
Owner

Sorry but I can't reproduce the issues. Can you please tell me more details?

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