O'Reilly logo

Learn Swift on the Mac: For OS X and iOS by Waqar Malik

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    2

The Swift Playground in Xcode 6

The Swift playground is a new interactive environment in which developers can view and manipulate their code live, instead of having to continually go throught the complete compile-run-test cycle. You type your code, it’s evaluated, and you get feedback right away. You can see immediately whether your code is behaving as expected. Think of it as a mini project with one file and an SDK to compile against.

This chapter will walk you through creating your first playground and show you how to interact with the playground. You’ll also create your first simple program in Swift. You’ll be using playgrounds throughout this book, whenever you need to try out some standalone code.

I’ll also delve into the different ...

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