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

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

Notify of
avatar

Mickenson Laplante
Guest
Mickenson Laplante
13 days 13 hours ago

Ever thought of adding s reset button function ?

Mickenson Laplante
Guest
Mickenson Laplante
4 days 21 hours ago

CodeWithChris true that, okay.

CodeWithChris
Guest
CodeWithChris
4 days 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
25 days 21 hours ago

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

CodeWithChris
Guest
CodeWithChris
4 days 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
27 days 18 hours 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
27 days 14 hours 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
1 month 16 days ago

Alhamdulillah, finally completed another app courtesy CodeWithChris

Thallane
Guest
Thallane
1 month 29 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
1 month 29 days ago

I found the fail. 😀 translation typo

Thallane
Guest
Thallane
1 month 29 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
2 months 6 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
3 months 16 hours 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!

Ali Mostafa
Guest
Ali Mostafa
3 months 28 days ago

thanks a lot, man, but I created a launch screen but don't know how to put a delay on the launch screen.

SkiNNy
Guest
SkiNNy
29 days 2 hours ago

did u find out how

Mk Berou
Guest
Mk Berou
4 months 20 hours ago

Thank you for the  amazing tutorials but I need a bit of helpfunc showPopUp(_ title:String, message:String) {             let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)             let alertAction = UIAlertAction(title: "Play Again!", style: .default){action in self.playAgain()} alert.addAction(alertAction)             present(alert, animated: true, completion: nil)             } func playAgain() {             print("PlayAgain Was pressed")            } How to make that pressing on the UIAlertAction allow the player to be able to play again?

Mina Lee
Guest
Mina Lee
4 months 2 days ago

I use swapAt method to swap element in generatedCardsArray randomly:         for i in 0…generatedCardsArray.count – 1 {            let randomNum = Int(arc4random_uniform(UInt32(generatedCardsArray.count)))            generatedCardsArray.swapAt(i,randomNum )}

wpDiscuz