Save datePicker value using NSUserdefaults(xcode,swift2)
问题 How can we save the value of datepicker through nsuserdeafaults or anything.For example if a person chooses 5 pm then when he return to app he should see 5pm on the datepicker.I do not know how to include nsusersdefault into this below is the code @IBAction func NotificationButtonTapped(sender: AnyObject) { cancelLocalNotificationsWithUUID("NotificationID") //dateformatter for alert var dateFormatter = NSDateFormatter() dateFormatter.dateFormat = "hh:mm a" var strDate = dateFormatter