-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
Added workaround for a bug in UIDatePicker in count down mode. #105
Conversation
Thanks for contribution. |
Is there any way I could help with that? |
You can look at the failing tests inside the project:
If you have idea, why it fails now - please, let me know. |
Add a Bitdeli Badge to README
…cker-3.0 into tomaskraina-master
…tionSheetPicker-3.0 into emmanuelay-max-min-datepicker
It's really strange behaviour (so, we need do to async assignment in main thread from main thread). So, nevertheless - my test start to failing after that fix. It happens, because that tests execute As workaround - It's possible to not replace my assignment with yours async, but add it after. i.e. do the same work twice. In that case tests work as expected. I believe thinks there is should be a better solution. |
There is 2 solutions that I found:
datePicker.countDownDuration = self.countDownDuration;
dispatch_async(dispatch_get_main_queue(), ^{
datePicker.countDownDuration = self.countDownDuration;
});
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[NSThread sleepForTimeInterval:0.5f];
dispatch_async(dispatch_get_main_queue(), ^{
[_actionSheetDatePicker pressDoneButton];
});
}); |
Please add to that pull-request my fixes from |
Is it okay like this? |
Perfect! 👍 |
Added workaround for a bug in UIDatePicker in count down mode.
A solution proposed by Positron on http://stackoverflow.com/a/20204317/1161723
This fixes #104