Below is a link to some source files that I partially created whilst going through a tutorial on this book. Sorry for stating the obvious. I only got a little way through the tutorial before I ran into problems.
The error you get when you run the code is this:
As is mentioned in the book, this generally means that an outlet is not connected to the matching control. Since the error is thrown for
scoreLabel, the first thing to do would be to see if
scoreLabel is properly connected in the storyboard.
If you check the view controller’s Connections Inspector, you will see this:
As you will notice, the
scoreLabel is not connected to its outlet.
I corrected the problem and it still doesn’t work.
I think it’s another error.
It would be helpful if you post what the error message you see or what the crash is. If it doesn’t work, please post a screenshot or explain the issue in detail instead of simply saying “it doesn’t work” so that somebody can help you.
Don’t worry about. I worked it out. Thanks for help.