Setting minute interval
suggest changeYou can change minuteInterval to set the interval displayed by the minutes wheel. The default value is 1 and the maximum is 30. The interval has to divide 60 evenly. The wheel is the iOS 14 style only when preferredDatePickerStyle is wheels.
let datePicker = UIDatePicker(frame: CGRect(x: 0, y: 0, width: 320, height: 200))
datePicker.minuteInterval = 15
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents