I have a storyboard segue that hooks up VC1 to VC2. The identifier is "showDetail", and the destination ViewController class is YTimeCalendarDetailViewController. When I step through the following in my prepareForSegue, it throws a SIGABRT after failing to if let vc = segue.destination as? YTimeCalendarDetailViewController:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == DETAIL_SEGUE_ID,
let vc = segue.destination as? YTimeCalendarDetailViewController,
let selectedDate = selectedDate {
vc.employeeRecord = selectedJob.employeeRecord
vc.punches = timesheet[selectedDate]?.punches ?? []
vc.selectedDate = selectedDate
}
}
I've tripled checked my segue and viewControllers to make sure that they're pointing at the right things, inheriting from the right class etc. When I print out segue.destination in lldb, it tells me that there is a UIViewController, but I don't know how to find the exact class of the VC. Is this an issue with container views? VC2, contains 3 container views that I intend to show/hide via segmented control. But I doubt it...I'm just so out of ideas.