Using Standard Types

In this section, you are going to experiment with standard types in an Xcode playground. A playground lets you write code and see the results without the overhead of creating an application and checking the output.

In Xcode, select FileNewPlayground... (or, from the welcome screen, choose Get started with a playground). Make sure the platform is iOS and the template is Blank (Figure 2.2). After clicking Next, you can accept the default name for this file; you will only be here briefly.

Figure 2.2  Configuring a playground

Configuring a playground

When the file opens, notice that the playground is divided into two sections ...

Get iOS Programming: The Big Nerd Ranch Guide, 7th Edition 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.