I would like to receive a notification when the user dismisses the pop-up calendar for a .compact style UIDatePicker. The user may trigger several valueChanged while trying to select the right date, so I would like to get notified when the user taps outside the calendar to dismiss it.
CodePudding user response:
You can try to observe editingDidEnd
control event:
yourDatePicker.addTarget(self, action: #selector(yourCallback), for: .editingDidEnd)