-
-
Notifications
You must be signed in to change notification settings - Fork 739
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
DatePicker callback freezes screen #42
Comments
Hi. I implement similar thing in my example project right now (commit 0a1cfdd). Can you check it and compare this example with your code? |
Hi my code looks like this: - (IBAction)timeSelected:(id)sender { ActionSheetDatePicker *picker = [[ActionSheetDatePicker alloc] initWithTitle:@"" datePickerMode:UIDatePickerModeDateAndTime selectedDate:date target:self action:@selector(dateTimeSelected:onSender:) origin:sender]; picker.minimumDate = [NSDate date]; picker.hideCancel = YES; [picker showActionSheetPicker]; } -(void) dateTimeSelected:(NSDate *) selected onSender:(id) sender{ [self.timeSelector setTitle:[UIUtils dateToString:date format:@"MM.dd HH:mm"] forState:UIControlStateNormal]; } I think it is the same as the example right? So wondering why that happened. |
Can you implement the same scenario in example project? Is it reproduced? |
I have the same problem. The picker works and calls the appropriate action @selector but then the UI freezes and I can tap on nothing. At odds to figure out why? -- From: Zack Chung [email protected] The date time picker shows up when clicked on a button in a tableview cell. when selected a date, the picker disappeared and everything got frozen. touching and clicking did not work on the screen. any ideas? — |
@DoctorG very strange. I can't reproduce it yet. |
I'm Using:
Code: -(IBAction)lmpButtonClicked:(id)sender {
NSDate *pickerDate = self.patient.lmp;
if (!self.patient.lmp) {
pickerDate = [OBPatientTrackerAppDelegate stripTimeFromDate:[NSDate date]];
}
lmpActionSheetPicker = [[ActionSheetDatePicker alloc] initWithTitle:@"LMP" datePickerMode:UIDatePickerModeDate /*minInterval:15*/ selectedDate:pickerDate target:self action:@selector(lmpDateWasSelected:element:) origin:self.view];
lmpActionSheetPicker.hideCancel = NO;
[lmpActionSheetPicker addCustomButtonWithTitle:@"Delete" value:[OBPatientTrackerAppDelegate dateFromSqlDateFormat:@"2001-01-01"]];
[lmpActionSheetPicker showActionSheetPicker];
}
#pragma mark - Actionsheet selectors
-(void)lmpDateWasSelected:(NSDate *)selectedDate element:(id)element {
selectedDate = [OBPatientTrackerAppDelegate stripTimeFromDate:selectedDate];
self.patient.lmp = selectedDate;
self.patient.lmpIsUnknown = NO;
[self updateLabels];
[self updateSaveButton];
} |
I have confirmed the freezing happens both on the Simulator and on iPhone 5s running iOS8. I would really appreciate help as iOS8 update broke the old version of ActionSheetPicker3.0 in my app for users and the new version is freezing. I'm still looking for clues as to why this is freezing after calling the done selector (or cancel). Does this view look correct? |
Ok if you can help me figure out how to trap this error in the debugger I might be able to help figure out what is going on: 2014-09-18 23:07:20.096 OBPatientTracker[61100:2572510] unexpected nil window in _UIApplicationHandleEventFromQueueEvent, _windowServerHitTestWindow: (null) |
@DoctorG Yes, it looks correct. Is selector lifted after done button pressed? |
Yes the selector fires and runs the appropriate method if thats what you’re asking, but then the program is apparently in a run loop and the _windowServerHitTestWindow appears to to be NULL so I think that’s why touch events are not registering. But I’m out of my league here I don’t know how to further debug the problem or why it is happening in the first place. I sure would love it if we could solve this problem because I’ve been relying on the ActionSheetPicker Library and I’m stuck. Thank you so much for the all your (and other’s) hard work on this library! -- @DoctorG Yes, it looks correct. Is selector lifted after done button pressed? — |
It will be much easier to fix, if I will be able to reproduce it. |
Fixed in 1.1.14 |
The date time picker shows up when clicked on a button in a tableview cell. when selected a date, the picker disappeared and everything got frozen. touching and clicking did not work on the screen.
any ideas?
The text was updated successfully, but these errors were encountered: