ios - UIDatePIcker TouchUp Events programmatically in swift -


the following code using swift language not worked touchup events uidatepicker.

  var datepickerview : uidatepicker!   self.datepickerview = uidatepicker.init(frame: cgrectzero)   self.datepickerview.addtarget(self, action: #selector(ndsignupviewcontroller.dateaction(_:)), forcontrolevents: uicontrolevents.touchupinside)   self.dateofbirthtextfield.inputview = self.datepickerview    func dateaction(sender: anyobject) {       //...    } 

use uicontrolevents.valuechanged instead of uicontrolevents.touchupinside. hope :)


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -