Book Image

Beginning Swift

By : Rob Kerr, Kåre Morstøl
Book Image

Beginning Swift

By: Rob Kerr, Kåre Morstøl

Overview of this book

Take your first foray into programming for Apple devices with Swift.Swift is fundamentally different from Objective-C, as it is a protocol-oriented language. While you can still write normal object-oriented code in Swift, it requires a new way of thinking to take advantage of its powerful features and a solid understanding of the basics to become productive.
Table of Contents (10 chapters)

Summary


In this lesson, we've learned the basic language structure and syntax for the Swift programming language. We've now understood the following concepts:

  • The fundamental structure of Swift programs, and how to use an Xcode playground to develop simple and complex programs

  • How to create and use mutable and immutable Swift variables

  • The built-in data types available to Swift programs, and how to select the appropriate data type depending on circumstance

  • Swift's powerful optional construct for detecting and branching program flow when data values are not available

  • Swift's type inference and strict type safety syntax and usage

Now that you have the basics well in hand, we're ready to move on to the next lesson, where we'll learn how to use these language elements in complex Swift programs. Specifically, we'll look at the control flow structures and operators offered by Swift.