Hello World

All good computer books that are written to teach a computer language have a section that shows a user how to write a Hello World application. This book is no exception. In this section, we will show you how to write two different Hello World applications.

Our fist Hello World application will be the traditional Hello World application that simply prints Hello World to the console. Let's begin by creating a new Playground and naming it Chapter_1_Hello_World. The Playground can be either an iOS or an OS X Playground.

In Swift, to print a message to the console, we use the print() function. The print() function has been greatly enhanced in Swift 2. Prior to Swift 2, we had two separate print functions: print() and println(). Now both of ...

Get Swift: Developing iOS Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.