This is part of a series that will help guide you through reading The Swift Programming Language from Apple.
The intended audience for this guide are people that don't know Swift and possibly don't know any other programming language.
I wrote previously that the best way to get into iOS App development was to start with Swift, not an app tutorial. Apple's book is good enough to get started—this companion is meant to help you read it actively. By the time you are done with the book, you should have written a lot of Swift, not just read it.
You need to be able to see the book and an Xcode playground at the same time. That could be side-by-side on your Mac or you could read the book on an iPad.
It should look like this:
I have a 13" MacBook Pro, so this is kind of tight. Here's what it looks like for me.
There should be a line of code that looks like this
var str = "Hello, playground"
Put your cursor at the end of that line and type SHIFT-ENTER. This will run the playground up until that line of code (note the playhead on the left -- you could also use the mouse and tap that)
Read the book. Do not copy any code from the book into the playground—type it in yourself. Make sure you understand it before moving on.
After typing a line of code, you can type SHIFT-ENTER to run that line of code. The right side will show you the result.
The next post will be a companion to the "The Basics". If you need any help setting up, contact me.
Next Article: The Swift Programming Language Companion: The Basics