Preface

Swift has risen quickly to be one of the preferred languages among developers and will have a long and fruitful future under the guidance of Apple. Since making the language open source over a year ago, it's become clear that Swift will be a versatile cross-platform language with a wealth of opportunities beyond Apple's ecosystem.

This book will introduce you to programming in a fun and approachable way. We will be building and interacting with fun examples to help you grasp multiple concepts. We will also be building fun iOS applications to help solidify your knowledge of Swift.

Chapter 1, What is Programming?, introduces the Swift programming language.

Chapter 2, Getting Set up, shows you how to install Xcode and introduces you to writing code in a Playground file.

Chapter 3, Say Hello, helps you create your own Playground file and write your first line of code.

Chapter 4Favorite Things, discusses how to store values in variables and constants.

Chapter 5Factories, explains types and introduces the String and int types.

Chapter 6Making Pizza, outlines the problem that functions solve along with creating your own functions.

Chapter 7Toy Bin, covers the array and dictionary types.

Chapter 8Smarter Toy Bin, focuses on the use of loops and if-else statements.

Chapter 9, Make Some Friends, takes you through object-oriented programming and classes. You will create your first instance of a class.

Chapter 10, Pokémon Battle, helps you create your own Pokémon class along with having instances of this class interact with each other.

Chapter 11, Simon Says, introduces Interface Builder and Storyboards, and also helps you create your first application with a user interface.

Chapter 12, Starry Night, showcases the view hierarchy and auto layout. You will be creating an application that has a user interface that scales across multiple screen sizes and that will be able to change its background color at the press of a button.

Chapter 13, Space Pizza Delivery, shows you how to create an iOS application that incorporates everything we’ve learned so far. It also introduces enums, private variables, protocols, delegates, and property observers.

Chapter 14, Movie Night - iOS App, takes you through creating an iOS application that introduces UITableViews and persisting data between the launches of the application.