Skip to content

Instantly share code, notes, and snippets.

@MikeTradr
Last active January 3, 2017 01:39
Show Gist options
  • Save MikeTradr/60608a242adf8b84e3dff11e60647107 to your computer and use it in GitHub Desktop.
Save MikeTradr/60608a242adf8b84e3dff11e60647107 to your computer and use it in GitHub Desktop.
func didSelectDate(date:NSDate, inCell cell:DetailsTableViewCell){
if labels[selectedIndexPath!.row] == "Start"{ // Start date selected
let newStartDate = date
defaults.setObject(newStartDate, forKey: "startDT")
let duration = (defaults.objectForKey("eventDuration") as! Int) ?? 10
let doubleTimeDuration:Double = Double(duration * 60) //convert Int to Double for next calc.
endDT = date.dateByAddingTimeInterval(doubleTimeDuration)
defaults.setObject(endDT, forKey: "endDT")
//DM// help TODO can't get the endTiem field row to update with the new endTime, it is set but not updateding the label!
// self.loadResultsArray()
//self.tableV.reloadData()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment