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 unable to select date in inline datePickerStyle #505

Closed
ivan-magda opened this issue Sep 28, 2020 · 4 comments
Closed

iOS 14 unable to select date in inline datePickerStyle #505

ivan-magda opened this issue Sep 28, 2020 · 4 comments

Comments

@ivan-magda
Copy link

After #502 (Added background tap gesture to dismiss picker view - Background tap issue) clicks on date in the calendar dismisses the action sheet in UIDatePicker.Mode.date and UIDatePicker.Mode.dateAndTime modes.

https://github.com/skywinder/ActionSheetPicker-3.0/pull/502/files#diff-5334c1a36535b23b6b5af4fb0b6712f5R261-R267

The documentation of the UIGestureRecognizerDelegate.gestureRecognizer(_:shouldReceive:) stands out that you should return YES (the default) to allow the gesture recognizer to examine the touch object, NO to prevent the gesture recognizer from seeing this touch object.

@noorulain17
Copy link
Collaborator

@ivan-magda do you also face this issue in UIDatePicker.Mode.time mode too?

The Gesture Delegate is returning NO for those views where the sheet is visible (by comparing the viewTag, because the bottom touch shouldn't dismiss the sheet, only the touch at the top translucent view should dismiss the view.

@ivan-magda
Copy link
Author

@noorulain17 UIDatePicker.Mode.time mode works well.

@noorulain17
Copy link
Collaborator

Hmm.. Technically all modes should have the problem. Thanks for reporting, I'll look into this.

@noorulain17 noorulain17 self-assigned this Sep 28, 2020
palmtrae added a commit to TheFarm/ActionSheetPicker-3.0 that referenced this issue Oct 12, 2020
This solution works, but there's a small caveat. In iPhone X style phones,
the notch corners wont trigger the dismiss action. Otherwise it works as
expected.
@noorulain17 noorulain17 removed their assignment Oct 12, 2020
noorulain17 pushed a commit that referenced this issue Oct 25, 2020
This solution works, but there's a small caveat. In iPhone X style phones,
the notch corners wont trigger the dismiss action. Otherwise it works as
expected.
@noorulain17
Copy link
Collaborator

Fixed in #514

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