NEW! Pre-order my latest book, Testing Swift! >>

< Previous: From outlets to actions: IBAction and string interpolation   Next: Project 3 >

Wrap up

This is 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, integers, doubles, floats, operators (+= and -=), UIButton, enums, CALayer, UIColor, random numbers, actions, string interpolation, UIAlertController, and more. And you have a finished game too!

If you feel like working on this app some more, see if you can figure out how to place a UILabel onto the view controller and connect it via an outlet, then show the player's score in there rather than in a UIAlertController. You'll need to use your label's text property along with string interpolation to make it work. Good luck!

You did it! Now what?

You finished another project, and I'm glad Hacking with Swift helped you. Now I need your help. Please take just a moment out of your day to tell others about Hacking with Swift so they can benefit too.

You can click below to post a tweet straight to this project. Or if you're feeling particularly generous, you can click here to link to Hacking with Swift on your website and help spread the word.

Thank you. Your support is what keeps me going!

 

About the author

Paul Hudson is the creator of Hacking with Swift, the most comprehensive series of Swift books in the world. He's also the editor of Swift Developer News, the maintainer of the Swift Knowledge Base, and Mario Kart world champion. OK, so that last part isn't true. If you're curious you can learn more here.

Build for watchOS

Take your existing Swift skills to Apple's tiniest platform – check out Hacking with watchOS!

< Previous: From outlets to actions: IBAction and string interpolation   Next: Project 3 >
MASTER SWIFT NOW
Buy Testing Swift Buy Practical iOS 12 Buy Pro Swift Buy Swift Design Patterns Buy Swift Coding Challenges Buy Server-Side Swift (Vapor Edition) Buy Server-Side Swift (Kitura Edition) Buy Hacking with macOS Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with Swift Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let me know!

Average rating: 5.0/5

Click here to visit the Hacking with Swift store >>