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

c++ - list<myClass<int> * > sort -

c - Defining floating point constants, how many digits are useful? -

C# Apple Bonjour - how to monitor service records within Windows -