squimer / DatePickerDialog-iOS-Swift

Date picker dialog for iOS
MIT License
581 stars 177 forks source link

DatePickerDialog gets dismissed on raising an iOS 10 device. #42

Closed mayurdzk closed 7 years ago

mayurdzk commented 7 years ago

This could simply be an iOS 10 bug but running an app on an iPhone 6S running iOS 10 device causes the DatePickerDialog to dismiss (since the close() function gets called) itself when the user raises their iPhone or sets the iPhone down. (Similar motions to the raise-to-wake gesture on iPhone 6S/+ devices)

Steps to reproduce:

The deviceOrientationDidChange method is subscribed to the UIDeviceOrientationDidChange event and calls close() when the event is triggered. iOS 10 is apparently providing the device a UIDeviceOrientationDidChange event on a 'raise' gesture. A temporary fix--for apps that only support portrait mode-- is to comment the call to close()

mayurdzk commented 7 years ago

As far as I can tell, this bug has been fixed in the latest DatePickerDialog release.