4.2 Creating a New Playground
To create a new Playground, start Xcode and select the File -> New -> Playground… menu option. Choose the iOS option on the resulting panel and select the Blank template.
The Blank template is useful for trying out Swift coding. The Single View template, on the other hand, provides a view controller environment for trying out code that requires a user interface layout. The game and map templates provide preconfigured playgrounds that allow you to experiment with the iOS MapKit and SpriteKit frameworks respectively.
On the next screen, name the playground LearnSwift and choose a suitable file system location into which the playground should be saved before clicking on the Create button.
Once the playground has been created, the following screen will appear ready for Swift code to be entered:
Figure 4-1
The panel on the left-hand side of the window (marked A in Figure 4-1) is the Navigator panel which provides access to the...