How to "open this chapter as a playground in Xcode"?

I have a Swift book open on iBooks, and see the note, “For a better experience, open this chapter as a playground in Xcode.” How it's done?

+67
xcode swift swift-playground
Jun 04 '14 at 3:50
source share
2 answers
  • Launch Xcode 6
  • Documentation and API Description Window (command-shift-0)
  • Find "Quick Language"
  • Click the first sentence

On the left side of the screen you will see a series of collapsible menus, which will present various sections, such as "Swift Tour" and "Language Guide". You can click them to get different bits of information about different aspects of the language.

Many sections will show the "Open Playground" links that you described, except here, theyre clickable. When you click one of these "Open Playground" .playground , the .playground file associated with this section will be downloaded to your download folder and can be directly opened with Xcode 6.

enter image description here

There is another option that allows you to open the files of the playgrounds directly, without dropping them in the download folder.

In the documentation viewer in Xcode 6, search for “A Swift Tour” or any other term you find to give you the article you're looking for:

enter image description here

Click a result that has a .playground icon to its left. Here you can use the "Action" button on the right side of the window to open the file directly on the Xcode playground.

enter image description here

+54
Jun 09 '14 at 4:52
source share

Simply put, open the book on your Mac or iPad, you will see the link “Download the playground”, just under this statement “open this chapter as a playground in Xcode”. You have to download this playground and open it, that's all.

I was tricked because I thought I didn’t need to download the playground, since I already have Xcode installed, obviously I have to do this.

0
Jan 16 '19 at 9:19
source share



All Articles