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
Post a Comment