O'Reilly logo

Swift 2 for Absolute Beginners by Brad Lees, Gary Bennett

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    8

Programming Basics in Swift

Swift is an elegant language. It mixes the efficiency of a compiled language with the flexibility and modern features of many scripting languages.

This chapter introduces some of the more common concepts of Swift, such as properties and collection classes. It also shows how properties are used from within Xcode when dealing with user interface elements. This sounds like a lot to accomplish, but Swift, the Foundation framework, and the Xcode tool provide a wealth of objects and methods and a way to build applications with ease.

Using let vs. var

If you have spent much time with Swift, you have seen the word var appear before variable declarations. You may also have seen let before other declarations. The ...

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