Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get UIDatePicker value in the UILabel on button click?

Please help me to get the value of UIDatePicker to UILabel on button click for an iPhone application.

like image 514
imsatasia Avatar asked Feb 09 '10 18:02

imsatasia


1 Answers

Swift 2.0

@IBAction func buttonPressed(sender: AnyObject) {
    let date: NSDate = timePicker.date
    label.text = date.description
}
like image 51
Manuel BM Avatar answered Oct 22 '22 13:10

Manuel BM