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.
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.