Book Image

Swift Cookbook

By : Cecil Costa, Cecil Costa
Book Image

Swift Cookbook

By: Cecil Costa, Cecil Costa

Overview of this book

Table of Contents (18 chapters)
Swift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating the first playground


In this recipe, you will get familiarized with the Xcode playground. Here, you will learn some basics of this Xcode feature, and after this, you will be able to test your own code using this new friend.

Getting ready...

Open your Xcode, but this time, instead of creating a new project, you have to choose Get started with playground, as shown here:

Once you have done it, you will see that the next dialog is a very simple one, which will ask only the project name and the platform (iOS or Mac OS). Call it Chapter 6 First Playground and select iOS, as shown here:

Then, you will see the famous dialog that asks you where to store your app. Choose a folder that you want for it. If you have doubts, choose the documents folder.

Before we start with our playground, open the Finder window corresponding to the folder where you saved your project, right-click (or control click) on your playground project, and click on Show package contents.

Now, you can see that there are three...