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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access