Skip to content

Commit 60b44ad

Browse files
committed
Fix CI build
1 parent c5f7a9f commit 60b44ad

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Loop/View Controllers/CarbEntryViewController.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,11 @@ final class CarbEntryViewController: ChartsTableViewController, IdentifiableClas
219219
cell.titleLabel.text = NSLocalizedString("Date", comment: "Title of the carb entry date picker cell")
220220
cell.datePicker.isEnabled = isSampleEditable
221221
cell.datePicker.datePickerMode = .dateAndTime
222-
if #available(iOS 14.0, *) {
223-
cell.datePicker.preferredDatePickerStyle = .wheels
224-
}
222+
#if swift(>=5.2)
223+
if #available(iOS 14.0, *) {
224+
cell.datePicker.preferredDatePickerStyle = .wheels
225+
}
226+
#endif
225227
cell.datePicker.maximumDate = Date(timeIntervalSinceNow: maximumDateFutureInterval)
226228
cell.datePicker.minuteInterval = 1
227229
cell.date = date

0 commit comments

Comments
 (0)