When I click on the “Due Date”, the app will crash。Why?
var dueDate = NSDate()
…
func showDatePicker() {
…
datePicker.setDate(dueDate, animated: false)
}
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
When I click on the “Due Date”, the app will crash。Why?
var dueDate = NSDate()
…
func showDatePicker() {
…
datePicker.setDate(dueDate, animated: false)
}
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
I know that the problem is, the datePicker’s outlet not connected.