Before we jump into building the app that we will be creating in later chapters, called Let's Eat, we need to understand the basics of Swift. An easy way to experiment with Swift is to use Playgrounds. It is an interactive coding environment that evaluates your code and displays the results. Using Playgrounds gives us the ability to work with Swift without needing to create a project. It is great for prototyping a particular part of your app. So, whether you are learning or experimenting, Playgrounds are an invaluable tool. In order to create a Playground, we need to launch Xcode and click on Get started with a playground
:
The Playground
template screen will appear. Make sure that you select iOS
, then choose Blank
and hit Next
:
You will be asked to give your project a name and a location to save the file; name your new Playground iOS11-Programming-for-Beginners-Ch2
. You can save the file anywhere that you like. Now, with the project saved, we...