Swift Dictionaries and Arrays Primer Tutorial

Swift Dictionaries and Arrays Primer Tutorial

Swift Dictionaries and Arrays Primer Tutorial

With some inspiration from Swift Fundamentals The Language of iOS Development by Mark Lassoff (ISBN 9780990402053), today, we touch on some of the following elements of the Xcode (IDE) use of the Swift language … you guessed it … The Language of iOS Development …

  • variable data types String and Int and Bool
  • array
  • dictionary
  • if statements
  • for loops
  • string concatenation (in println statements)

… in Xcode you can test such Swift functionality in the “Playground” (functionality) section.

You see the results of your coding as they build up over to the right of the Xcode window, pretty much instantaneously. To “drill” down to results of a loop click the “Value History” round buttons, where this takes you to graphical representations of the data … quite cute really.

So these are some of the bits and pieces of knowledge you can develop further to build up ideas for the creation of iOS mobile applications, which you may eventually want to sell on the Apple App Store (eg. for Australia).

You may wonder with the arrays (in section-1.swift) why there is a separate “tophomeawaypoints:[String: Int]” dictionary and “bothomeawaypoints:[String: Int]” one as well (also for “top8:[String]” array and a “bot10:[String]” by association). Well, this was done, really, following the advice of the Swift interpreter, saying that the structure was “too complex” to have the one dictionary and one array here.

So take a look at today’s Swift programming source code you could call section-1.swift where we analyze the AFL 2014 Home and Away Ladder hoping that Collingwood has a better 2015!

If this was interesting you may be interested in this too.

This entry was posted in eLearning, iOS, Tutorials, Xcode and tagged , , , , , , , , , . Bookmark the permalink.

15 Responses to Swift Dictionaries and Arrays Primer Tutorial

  1. view it says:

    Some truly nice and utilitarian information on this website, likewise I think the pattern holds great features.

  2. address says:

    I’ve been absent for a while, but now I remember why I used to love this web site. Thanks, I will try and check back more often. How frequently you update your web site?

  3. loving says:

    You can certainly see your expertise within the work you write. The arena hopes for more passionate writers like you who are not afraid to mention how they believe. Always go after your heart. “A second wife is hateful to the children of the first a viper is not more hateful.” by Euripides.

  4. Spot lets start on this write-up, I seriously believe this wonderful internet site requirements significantly much more consideration. IÒ€ℒll far more likely once once again to read an excellent deal more, a lot of thanks that information.

  5. magnificent submit, quite informative. I ponder why the opposite experts of this sector donÒ€ℒt realize this. You need to proceed your writing. IÒ€ℒm sure, youÒ€ℒve an excellent readersÒ€ℒ base already!

  6. I put a WordPress blog on my website a few days ago, and I was just curious about how it works. So I just want to know if all the posts are saved into a single file or if they are separate for each post. Then I also want to know where they can be found on my server. Thanks.

    • admin says:

      There’s the one database containing separate records in database tables for each blog posting, and that database is MySQL … Thanks.

  7. prominent says:

    You can definitely see your enthusiasm within the paintings you write. The world hopes for even more passionate writers such as you who are not afraid to say how they believe. Always follow your heart.

  8. Hiya, I’m really glad I have found this information. Nowadays bloggers publish just about gossips and web and this is really annoying. A good site with interesting content, this is what I need. Thank you for keeping this web site, I will be visiting it. Do you do newsletters? Cant find it.

  9. seek says:

    Helpful info. Lucky me I discovered your web site by chance, and I am surprised why this accident did not came about in advance! I bookmarked it.

  10. Ben Bartrop says:

    This internet web site is generally a walk-through its the info you wished about this and didn’t know who ought to. Glimpse here, and you will certainly discover it.

  11. What’s up, everything is going sound here and ofcourse every one is sharing data, that’s really fine, keep up writing.|

  12. F*ckin’ tremendous issues here. I’m very happy to see your article. Thanks so much and i’m taking a look forward to touch you. Will you please drop me a e-mail?

  13. Jim Cabada says:

    I got what you mean , appreciate it for putting up.Woh I am pleased to find this website through google. “You must pray that the way be long, full of adventures and experiences.” by Constantine Peter Cavafy.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>