Topics
Published on January 16, 2018 by CodeWithChris

We’re at the final stretch! The last thing to make this game pop is to add sounds to it.

Sound files:
codewithchris.com/code/Module03Lesson11Sounds.zip

You’ll learn how to include these sounds into your Xcode project and use the AVAudioPlayer class to play them!

We’ll also randomize the cards and add code so that only unique pairs are included in our set of cards.

This video series builds upon (and requires) the skills learned in these two playlists (So please watch these first if you haven’t already!):

How To Make an App for Beginners:

Build Your Swift Skills:

My Courses:
codewithchris.com/beginnercourse/

Twitter:
twitter.com/CodeWithChris

Reddit:
www.reddit.com/r/CodeWithChris

———————————-

This video series uses the latest and greatest from Apple (Xcode 9, Swift 4, iOS 11) and will teach a beginner with no programming experience how to make iPhone apps. I’m creating these videos with the assumption that the student has no prior knowledge and is starting from scratch.

For more tutorials on how to build iPhone apps, make sure you subscribe and visit my site where you’ll find a community of like minded learners! Learning something new is always more fun with other people!

CodeWithChris is dedicated to teaching beginners and non-programmers all about how to make an app. On the site, you’ll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have successfully picked up Swift 4, Xcode 9 and app building from my course and materials!

Here’s just a sample of the success stories my students have sent in:

68 Beginners Share Their Success Stories

Leave a Reply

36 Comments on "How To Build a Match Game – Lesson 11 (Sounds)"

Notify of
avatar

Timeer Mehta
Guest
Timeer Mehta
1 month 12 days ago

Hey Chris, I have 2 issues remaining after finishing my app.I still get the auto layout localization issue from clipping which you had addressed earlier. I did everything you said but it still remains. Also I get a misplaced view error saying the frame for "CardCell" will be different at run time. It says size will be (0,234) at run time butt is (158,224) in the canvas

CodeWithChris
Guest
CodeWithChris
1 month 12 days ago

Hey Timeer, I wouldn't worry about either of them! For the second issue, in storyboard view, there's a button to the left of the add constraints button that looks a refresh icon. Clicking that should change the size of the card cell to match the constraints and remove that warning.

John York
Guest
John York
2 months 8 days ago

Thank you so much Chris, this tutorial series and the other ones I've seen have all been extremely professional and helpful. Thanks to you I now have this app plus the war game app and a much better understanding of Xcode and swift. You are a godsend, 10/10 will share this channel with my friends.

CodeWithChris
Guest
CodeWithChris
2 months 8 days ago

Thank you so much for sharing! Please keep in mind we have additional content on www.codewithchris.com and a Facebook page to chat about apps: www.facebook.com/groups/codewithchriscommunity/

Jonny Bravo
Guest
Jonny Bravo
2 months 9 days ago
Hi Chris. Firstly, let me thank you for the tutorials. I am new to Swift and iOS development, but definitely not to coding. While watching your lessons, I notice you emphasize following naming conventions and paradigms. Here are my own suggestions:1) When defining variables as boolean, it is typical to name them with something like "isComplete". Using that standard, it is very easy to ascertain what the variable represents. By that same logic, it is redundant to put the logical comparison explicitly in a conditional. I heard your reasons (you want to really explicitly show the condition). However, convention would… Read more »
Jonny Bravo
Guest
Jonny Bravo
2 months 9 days ago
It's not that what you are doing is wrong. You can certainly continue to write your code the way you do. The most important thing is that you remain consistent with whatever choice you make. I do (and have done throughout my career) a lot of code reviews. Like everyone else, I've got my pet peeves, and inconsistency is one of them.Reading code can be confusing for those beginning to write it, especially when symbols can, and in Swift's case do, have multiple meanings depending on where the symbol is placed. The example here is the use of ! having… Read more »
CodeWithChris
Guest
CodeWithChris
2 months 9 days ago

Thanks for the comments! I'll make sure to make my Bool more standard.You are right. The reset button is not part of this video but my students have found multiple clever ways to improve their app. They posted it on Facebook in the group that was created for this kind of question. Please come and share yours once you have done it! www.facebook.com/groups/codewithchriscommunity/

Mickenson Laplante
Guest
Mickenson Laplante
3 months 9 days ago

Ever thought of adding s reset button function ?

Mickenson Laplante
Guest
Mickenson Laplante
3 months 21 hours ago

CodeWithChris true that, okay.

CodeWithChris
Guest
CodeWithChris
3 months 21 hours ago

Students have come up with their own solution of reset, new graphics, new colors. It fully customizable, you have so much freedom with iOS. Share yours once you have done it! Stepping outside of a tutorial to implement your own ideas is the best way to learn!

FARJANA YASMIN NIPA
Guest
FARJANA YASMIN NIPA
3 months 22 days ago

The sound files link does not working. How can I get that?

CodeWithChris
Guest
CodeWithChris
3 months 18 hours ago

I just tested and it works. Make sure you do not have an ad blocker or anything preventing from letting the download make its way to you.

TennisDrum
Guest
TennisDrum
3 months 24 days ago

Finished the Match Game – this one was a beast. You did a great job. I'm loving your tutorials. I'm going to play with the match game to try to figure out how to add a 'new game' button. Will post questions when I run into a brick wall!

TennisDrum
Guest
TennisDrum
3 months 24 days ago

Having a great time – figured out how to add a 2nd screen & view controller in the storyboard, make it the initial view controller, and add buttons to both screens that move the user between the two. Thanks again for the great tutorials!

Jabal Nur
Guest
Jabal Nur
4 months 12 days ago

Alhamdulillah, finally completed another app courtesy CodeWithChris

Thallane
Guest
Thallane
4 months 26 days ago

Thanks for the guide Chris. I wonder, can i expand this game to have more difficulties and if so can i use the same code or will it just get messed up with each other.

Thallane
Guest
Thallane
4 months 26 days ago

I found the fail. 😀 translation typo

Thallane
Guest
Thallane
4 months 26 days ago

Just a little side note, even though we got the same code now, i still get Thread 1: Fatal error: Index out of range message and it wont run. any suggestions

Chris Chase
Guest
Chris Chase
5 months 2 days ago

on the line: generatedCardsArray[randomNumber] = temporaryStoragei get an error that says "Cannot assign value to of type 'Int' to type 'Card"Cant figure out how to solve it…

Tomi
Guest
Tomi
5 months 27 days ago

Hi Chris thank you a lot I learn a lot but I have question where you do the sounds and the cards? Thank you again!

wpDiscuz