I'm getting a "Fatal error: Unexpectedly found nil while unwrapping an Optional value" when I try to 'safely' unwrap a userdefault.
Previously I never had this problem and now when I've been forced to change over to a new view controller for this particular view (since I'm trying to redesign the UI), so I tried to use if let to safely unwrap, but the error still throws. To me, it looks like both switchState and newSwitchState have values but yet they still throw.
I've included a screenshot below. I'm a tad confused, but I have a nagging feeling that it is something simple I have overlooked.
Any help would be much appreciated.