After returning to Swift after a long time I really need a number pad for what I'm working on now. I'm currently following this video https://youtu.be/vI7m5RTYNng?t=319 (start at 5:19) however at 7:18 when he builds the app again and it works, mine still crashes with the same error. I've checked the code in AppDelegate at least 5 times and everything is exactly the same as his code down to the last character. I've attached my code below. I don't know if something has changed with Swift since the video was released since when I switched to AppDelegate for the first time var window:UIWindow?
wasn't there, I had to type it in myself. I'm frustrated to say the least. Any help much appreciated.
My code for proofreading:
AppDelegate:
ViewController:
Error message:
2020-02-26 00:14:41.148993+0000 software[714:18581] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UICollectionViewController loadView] instantiated view controller with identifier "UIViewController-BYZ-38-t0r" from storyboard "Main", but didn't get a UICollectionView.'