Skip to content

Commit

Permalink
Use wheels for datepickers when using an old Xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
mats-claassen committed Sep 15, 2020
1 parent af6d998 commit 9fe153d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Rows/DateInlineRow.swift
Expand Up @@ -36,7 +36,11 @@ extension DatePickerRowProtocol {
func configurePickerStyle(_ cell: DatePickerCell, _ mode: UIDatePicker.Mode = .dateAndTime) {
cell.datePicker.datePickerMode = mode
if #available(iOS 14.0, *) {
#if swift(>=5.3)
cell.datePicker.preferredDatePickerStyle = .inline
#else
cell.datePicker.preferredDatePickerStyle = .wheels
#endif
}
else if #available(iOS 13.4, *) {
cell.datePicker.preferredDatePickerStyle = .wheels
Expand Down

0 comments on commit 9fe153d

Please sign in to comment.