How To Make an App – Ep 15 – Introducing Arrays in Swift (Xcode 7, Swift 2)

[ad_1]
How To Make iPhone Apps with NO Programming Experience!
Lesson 15: Introducing Arrays in Swift

This lesson introduces Arrays and shows you how to use them to display the card images.

Swift Programming Language Guide:

This video series uses the latest and greatest from Apple (Xcode 7, Swift 2, iOS 9) 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.

The lesson plan for the How To Make an App series can be found on my site here:

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!

Website:
Youtube:

CodeWithChris is dedicated to teaching beginners and non-programmers all about building iOS apps. 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, Objective-C, Xcode and app building from my course and materials!

Intro & Outro music
“Heartbreaker” by Jahzzar (


Posted

in

by

Tags:

Comments

9 responses to “How To Make an App – Ep 15 – Introducing Arrays in Swift (Xcode 7, Swift 2)”

  1. Darren K Avatar

    I'm trying to do this with 52 cards and the problem I have is that there are 4 cards of each so when they are drawn against each other, because they are ordered in the array, the higher order card wins even though they are essentially the same value, does anyone know how I can set a class for 4 cards and use that in the array?

  2. Elpida Bantra Avatar

    everything was going fine until I changed variables firstRandomNumber and firstCardString from String to arrays, now I have build succeeded but the app is crashing as the simulator remains black, even though I changed them again (from arrays to Sting the same variables) it still crashes (before the first change it wasn't crashing), what am I supposed to do?

  3. Amy Good Avatar

    I'm not sure why, but when I changed the firstCardString:String to equal self.cardNamesArray and then hit return and added the [firstRandomNumber], I got an error message. It said "Cannot convert value of type "[String]" to specified type 'String'.

    However, when I removed the space, it worked and there was no error message. Any idea why this happened?

  4. Stefano Fasce Avatar

    Hi Chris! Awesome tutorial, really helpful! If I wanted to show the cards in the order I wanted, I mean without having them random but instead having them in order from 1 to the 13 what should I change in the firstRandomNumber constant? Also one thing I've notice is that despite in my app I have 42 images ( I modified the func to "Int(arc4random_uniform(42))"), it tends to repeat some of them more often than others but I don't know why. Thank you very much for your help and for doing these tutorials!

  5. T 无名氏 Avatar

    Looking forward for more vedios. Thanks A Lot!

  6. BioCycle Avatar

    awesome vids. Could you do another tutorial like this except with harder concepts such as multiple view controllers and passing data between them? Thanks

  7. Miguel Deleon Avatar

    is it necessary to put the () after the empty Int array?

Leave a Reply

Your email address will not be published. Required fields are marked *