O'Reilly logo

Learn Swift on the Mac: For OS X and iOS by Waqar Malik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    1

Hello Swift

Swift is a new language designed by Apple for developing iOS and OS X applications. It takes the best parts of C and Objective-C and adapts them with modern features and patterns. Swift-compiled programs will run on iOS7 or newer and OS X 10.9 (Mavericks) or newer.

The two main goals for the language are compatibility with the Cocoa and Cocoa Touch frameworks, and safety, as you’ll see in the upcoming chapters. If you’ve been using Objecive-C, especially the modern syntax, Swift will feel familiar.

But Swift’s syntax is actually a major departure from Objective-C. It takes lots of cues from programming languages like Haskell, C#, Ruby, and Python.

Some of the technologies I’ll cover in this book are:

  • Automatic reference ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required