I'm lost on this one. I've read many answers to this particular question and I just can't get this working.
I have two view controllers - ScheduleService which is part of the storyboard and CalendarView which is not. I've got a calendar created in CalendarView and when a user selects a date on the calendar I'm wanting to push that date to label.text on ScheduleService.
At first I thought this would be easy:
let viewControllerSS = ScheduleService()
viewControllerSS.infoLabel.text = lbl.text
Intellisense sees the infoLabel control but when I try to assign a value to it I get the error stated in the title:
"Unexpectedly found nil while unwrapping an Optional values"
On the ScheduleService class I've got a label created:
@IBOutlet weak var infoLabel: UILabel!
How can I successfully push a value from lbl.text on CalendarView to infoLabel.text on ScheduleService without getting this error?