I am trying to replicate the timer picker from the Clock app, shown below, using SwiftUI.
DatePicker
doesn't have a countDownTimer
mode like UIDatePicker
does, but then that doesn't show seconds even though the countDownDuration
property is in seconds.
I am currently trying to use a custom UIPickerView
with two components (minutes and seconds), all wrapped inside a UIViewRepresentable
.
This sort of works, but I can't seem to get the min
and sec
labels to be positioned where they are.
Any help on this matter would be much appreciated.