I have 2 screens in my app that show (exercise) videos, one show videos that the user must do during that week. The other shows the history off all the weeks. The screens are almost the same except the first screen has an element to show the week number the other (history) does not.
When I click the history button in the first screen it shows the history video screen. At least it used to do, but I made almost no changes and upgraded to a later version of xcode and now I get the following error :
this class is not key value coding-compatible for the key weekLabel.
This is the code that induces the new screen to show the history videos :
@IBAction func goToVideosHistory(_ sender: UIButton) {
let exercisesHistoryVC = ExercisesHistoryViewController.instantiate(from: .Main)
exercisesHistoryVC.modalPresentationStyle = .fullScreen
parent?.present(exercisesHistoryVC, animated: true, completion: nil)
}
My knowledge about Xcode is to less to debug this problem, the one thing I can see is that when I set a breakpoint just after the let exerciseHistoryVC and I check the UIview number it has a different number then when it crashes.
So my guess is that it loads the wrong view for my view controller. I know a little bit how Storyboard works, but I have no idea where Xcode/swift internally loads screens..