Skip to content
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

UIDatePicker Style in iOS 14 #1074

Closed
Andy0570 opened this issue Sep 29, 2020 · 4 comments
Closed

UIDatePicker Style in iOS 14 #1074

Andy0570 opened this issue Sep 29, 2020 · 4 comments

Comments

@Andy0570
Copy link

Andy0570 commented Sep 29, 2020

The style of UIDatePicker has been updated in iOS 14. How to adjust the height of the embedded UIDatePicker in XLForm?

https://static01.imgkr.com/temp/499d2e1156bd4853a647053c0c583b96.PNG

@colinrblake
Copy link

Not a fix, but a workaround to revert back to the old scroll wheel style date/time picker. In XLFormDateCell.m, around line 200 is the method *-(void)setModeToDatePicker:(UIDatePicker )datePicker. At the start of that method add the following:

    if (@available(iOS 13.4, *)) {
        datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;
    }

Can't guarantee it'll fix all your cases, but it certainly fixed all mine.

@mats-claassen
Copy link
Member

This should also work if you want a wheel picker:

if #available(iOS 13.4, *) {
       row.cellConfigAtConfigure["datePicker.preferredDatePickerStyle"] = UIDatePickerStyle.wheels.rawValue
}

@nirav78
Copy link

nirav78 commented Nov 4, 2020

[row.cellConfigAtConfigure setObject:@(UIDatePickerStyleWheels) forKey:@"datePicker.preferredDatePickerStyle"];

I have added the above line. It does not seem to be working. I am not getting the traditional wheel picker.
It works for "XLFormRowDescriptorTypeDate" but not for "XLFormRowDescriptorTypeDateInline"

@mats-claassen
Copy link
Member

Fixed in #1078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants