Skip to content

Commit

Permalink
Merge pull request #21 from Diwann/fix-crash-with-multiple-okbtn-clicks
Browse files Browse the repository at this point in the history
preventing the button to wait before closing the modal
  • Loading branch information
hons82 committed Feb 16, 2015
2 parents 8c8fe45 + 907e1c1 commit b4d9503
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions THCalendarDatePicker/THDatePickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,8 @@ - (IBAction)okPressed:(id)sender {
if (_autoCloseOnSelectDate) {
[self setDate:[NSDate date]];
[self redraw];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.delegate datePickerDonePressed:self];
});
} else {
[self.delegate datePickerDonePressed:self];
}
[self.delegate datePickerDonePressed:self];
}
}

Expand Down

0 comments on commit b4d9503

Please sign in to comment.