1.原因:
新增了一个 preferredDatePickerStyle 导致的默认UI样式变化
/// Request a style for the date picker. If the style changed, then the date picker may need to be resized and will generate a layout pass to display correctly.
@property (nonatomic, readwrite, assign) UIDatePickerStyle preferredDatePickerStyle API_AVAILABLE(ios(13.4)) API_UNAVAILABLE(tvos, watchos);
2.恢复
if (@available(iOS 14.0, *)) {
self.datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;//此处记得再写一下frame, 在datePickerMode设置之后self.datePicker.frame = CGRectMake(0, 50, 290, 160);
}