I got most of the way through chapter 7 with my HypnoTime app working fine. I then made some changes as per the book’s instructions towards the end of the chapter and suddenly it crashed whenever I clicked into the Time view.
I couldn’t see my mistake in the code so I carefully picked my way back, undoing what I’d done until I got to the point where it worked again. I never got to that point - no matter how far I took it back it still did not work.
So I deleted the project and started from scratch, closely following the book’s instructions. It still had the same problem right from page 132 when I should be able to click between tabs. As soon as I click the second tab, the app crashes.
I tried the finished version of the app which was available to download from the Big Nerd Ranch site. That worked perfectly. I must have made a mistake so I deleted my HypnoTime project and started yet again. However, as son as I try to click that second tab, it crashes at the following line in main.m:
int retVal = UIApplicationMain(argc, argv, nil, nil);
with the following error:
Program received signal SIGABRT
The output console displays the following error:
*** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘-[UIViewController _loadViewFromNibNamed:bundle:] loaded the “CurrentTimeViewController” nib but the view outlet was not set.’
I can’t see anywhere in the book where I have been told to set an outlet for CurrentTimeViewController.
What am I doing wrong? I’d be very grateful for some advice as this is driving me mad.