Day 21
Day 21 ๊ด๋ จ
Project 2, part three
Now that our app is complete, itโs time for a quick recap what you learned, a short test to make sure youโve understood what was taught, then another set of challenges โ exercises designed to get you writing your own code as quickly as possible.
I do not provide the answers to these challenges. This is intentional: I want you to figure it out by yourself rather than just looking at someone elseโs work.
John Carmack once said, โfocused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better.โ
So, I hope you will agree that trying things out for yourself, making mistakes, and finding solutions is key to learning.
Today you should work through the wrap up chapter for project 2, complete its review, then work through all three of its challenges.
Wrap up
Wrap up
This was another relatively simple project, but it's given you the chance to go over some concepts in a little more detail, while also squeezing in a few more concepts alongside. Going over things again in a different way is always helpful to learning, so I hope you don't view this game (or any of the games we'll make in this series!) as a waste of time.
Yes, in this project we revisited Interface Builder, Auto Layout, outlets and other things, but at the same time you've learned about @2x and @3x images, asset catalogs, UIButton
, CALayer
, UIColor
, random numbers, actions, UIAlertController
, and more. And you have a finished game too!
Review what you learned
Anyone can sit through a tutorial, but it takes actual work to remember what was taught. Itโs my job to make sure you take as much from these tutorials as possible, so Iโve prepared a short review to help you check your learning.
Click here to review what you learned in project 2.
Challenge
One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try extending this app to make sure you fully understand whatโs going on:
- Try showing the playerโs score in the navigation bar, alongside the flag to guess.
- Keep track of how many questions have been asked, and show one final alert controller after they have answered 10. This should show their final score.
- When someone chooses the wrong flag, tell them their mistake in your alert message โ something like โWrong! Thatโs the flag of France,โ for example.
Wrap up - Additional
Once youโre done, tell other people: youโve completed your first iOS game, youโve passed the test, and youโve even extended it with your own code.
You should be proud of what youโve accomplished โ good job!