Search code examples
iosswiftnsdateformatteruidatepicker

Changing mode of Date Picker


I have my Date Picker as:

enter image description here

But how do I make it like below:

enter image description here


Solution

  • change the UIDatePickerMode to UIDatePickerModeCountdownTimer.

    for e.g

    var pickerView = UIDatePicker()
    pickerView.datePickerMode = .CountDownTimer
    

    for more information you can see in Apple Documents