Post

Replies

Boosts

Views

Activity

Reply to UIDatePicker setDatePickerMode Crash in iOS14.7.1
This is my code, I don't have set dateFormatter. - (UIDatePicker *)datePicker {   if (!_datePicker) {     _datePicker = [[UIDatePicker alloc] initWithFrame:CGRectZero];     if (@available(iOS 13.4, *)) {       _datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;     }     NSDate *date = [NSDate date];     _datePicker.locale = [NSLocale currentLocale];     [_datePicker setDatePickerMode:UIDatePickerModeDate]; // crash     [_datePicker setMaximumDate:date];   }   return _datePicker; }
Oct ’21