Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Swift Soccer: Learn Swift The Fun Way: The Complete First Half
Swift Soccer: Learn Swift The Fun Way: The Complete First Half
Swift Soccer: Learn Swift The Fun Way: The Complete First Half
Ebook47 pages20 minutes

Swift Soccer: Learn Swift The Fun Way: The Complete First Half

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Have you tried learning Swift, but found other guides detailed and confusing? Dull and no fun? Don’t have an easy theme to follow? Well, with Swift Soccer – The Complete First Half, you’re on to a winner. You’ll discover the basics of Swift while building up to the kick off of a soccer match between LA Galaxy and Barcelona. You’ll learn about: team names and players, using Strings; choosing the players in a team, using Arrays; how Variables change – and how they affect the score; and Functions – by getting our players to score goals! And much more!

You'll see what code is produced - with full, detailed comments, so it’s easy to follow along - and all based on the Swift 3 - the most recent Swift update available. In the meantime, let the game begin!

LanguageEnglish
PublisherRob Garner
Release dateSep 9, 2016
ISBN9781365387548
Swift Soccer: Learn Swift The Fun Way: The Complete First Half
Author

Rob Garner

I’m a Digital Marketing Manager for an online book retailer, where I also design and produce web banners, graphics etc. I am an experienced developer in HTML and CSS, and I’m helping to teach Apple’s Swift programming language using my fun Swift Soccer approach. As a writer, I was asked to proof-check the website of one of the world’s most famous copywriters, Drayton Bird, and have written many adverts for the BBC. (You may also have heard of me as RobTheWriter.)

Read more from Rob Garner

Related to Swift Soccer

Related ebooks

Teaching Science & Technology For You

View More

Related articles

Reviews for Swift Soccer

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Swift Soccer - Rob Garner

    SWIFT SOCCER

    LEARN SWIFT THE FUN WAY

    The Complete First Half

    Rob Garner

    robgarner.net

    ISBN-13: 978-1537363219 

    ISBN-10: 1537363212 

    Copyright © Rob Garner 2016. All rights reserved

    It’s not easy trying to learn Swift, Apple’s programming language. However, as I’ve gone through various tutorials, books, articles and blogs, I realised that what I needed was some kind of fun connection with how I was learning. And so Swift Soccer was born...

    Let the game begin!

    NOTE: Where you see two slashes in green, like this:

    // Barcelona

    or

    // 3

    this shows you the code that would be displayed if you were using Apple’s Xcode Playground for Swift 3.

    In other words, this shows you what the code does!

    For example, let's have a match between two teams, LA Galaxy and Barcelona. First, we'll store their names in two separate values, teamOne for LA Galaxay, and teamTwo for Barcelona.

    NOTE: To make long words easier to read, Swift uses camel case. So, instead of queensparkrangers, we would write queensParkRangers.

    Also, don't think of the equals sign like in math, think of it more as assigning a value.

    As the teams’ names won’t change, their values can be made constants (using the keyword let).

    Also, as the team names contain letters, they go inside quotes, making them strings. By the way, strings are values which can hold almost any kind of character, such as letters:

    iLoveSoccer

    and

    Enjoying the preview?
    Page 1 of 1