Welcome to the second tutorial in this quick start guide to Swift. We’ll cover some of the concepts from the first part in more detail while also introducing more language features.
What you will learn…
- More detail regarding strings
- How to work with arrays and dictionaries
- Control flow with while loops and the switch statement
- How to work with enumerations
What you should know…
- A familiarity with at least one programming language
- The basics of the Swift programming language from part one
The primary focus of part two will be strings, collection types, control flow, and enumerations. We briefly looked at strings in part one but will spend more time with them here. We’ll also re-visit control flow, taking the time to examine while
loops, do-while
loops, and Swift’s powerful switch
statement. You may have noticed that arrays weren’t covered in part one. We’ll make up for that here and also focus on Swift’s other collection type: dictionaries. Finally we’ll round off part two by covering enumerations.
ECMAScript developers following this series will discover that most of what is covered here isn’t that dissimilar to the features found in languages such as JavaScript and ActionScript. Enumerations being really the only exception for some of you. For those from a C programming background, everything will feel familiar, although you may be surprised at the additional power and flexibility that Swift brings to many of these features.
As stated previously, everything covered in this series of tutorials can also be found in Apple’s own official guide to the Swift programming language. The intention here however is to focus on the elements of the language that are required to get newcomers up and running as quickly as possible. If you have the time and want the full detail then I highly recommend you head straight over to Apple’s Swift Programming Language Guide instead.
Continue Reading
Recent Comments