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 -

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

java - why am i getting a "cannot resolve method" error on getApplication? -