Skip to content

Commit

Permalink
Merge pull request alibaba#3278 from Txink/local
Browse files Browse the repository at this point in the history
[iOS] fix input component wakeup UIDatePicker
  • Loading branch information
jianhan-he authored Oct 9, 2020
2 parents e8fcb95 + faf65f1 commit f8c5ab0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ - (instancetype)init
}

datePicker.datePickerMode=UIDatePickerModeDate;
#ifdef __IPHONE_13_4
if (@available(iOS 13.4, *)) {
datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;
}
#endif
CGRect pickerFrame = CGRectMake(0, 44, [UIScreen mainScreen].bounds.size.width, WXPickerHeight-44);
datePicker.backgroundColor = [UIColor whiteColor];
datePicker.frame = pickerFrame;
Expand Down
4 changes: 3 additions & 1 deletion ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,11 @@ - (void)createDatePicker:(NSDictionary *)options callback:(WXModuleKeepAliveCall
{
self.callback = callback;
self.datePicker = [[UIDatePicker alloc]init];
#ifdef __IPHONE_13_4
if (@available(iOS 13.4, *)) {
self.datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;
self.datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;
}
#endif
if (UIDatePickerModeDate == self.datePickerMode) {
self.datePicker.datePickerMode = UIDatePickerModeDate;
NSString *value = [WXConvert NSString:options[@"value"]];
Expand Down

0 comments on commit f8c5ab0

Please sign in to comment.