Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I "open this chapter as a playground in Xcode"?

I have the Swift book open in iBooks, and see the note “For the best experience, open this chapter as a playground in Xcode.” How is this done?

like image 973
vonlost Avatar asked Jun 04 '14 03:06

vonlost


People also ask

How do I access Xcode playground?

To open Playground on Xcode, navigate to File in the menu and click on New > Playground... To test our square function, we will choose the Blank template. Name your Playground file, then click on Create.

Why is my Xcode playground not running?

Restarting Xcode and rebooting my macbook. Stopping the simulator via the Activity monitor and restarting it. Opening up new tabs in an attempt to refresh. Uninstalling and reinstalling Xcode via the app store.

What is playground in IOS?

Swift Playgrounds is a revolutionary app for iPad and Mac that makes it fun to learn and experiment with Swift — a powerful programming language created by Apple and used by the pros to build today's most popular apps. Swift Playgrounds requires no coding knowledge, so it's perfect for students just starting out.


1 Answers

  • Launch Xcode 6
  • Documentation and API Reference Window (command-shift-0)
  • Search for “The Swift Programming Language”
  • Click first suggestion

You will see a series of collapsable menus on the left side of the screen detailing different sections, such as “A Swift Tour”, and “Language Guide”. You can click through these to get different bits of information about different aspects of the language.

Many sections will feature the “Open Playground” links that you’ve described, except from here, they’re clickable. When you click one of these "Open Playground" links, the .playground file associated with this section will be downloaded to your downloads folder, and can be directly opened with Xcode 6.

enter image description here

There is even another option that allows you to open the playground files directly without first dropping them in your downloads folder.

In the documentation viewer in Xcode 6, search for "A Swift Tour", or any other term that you find to yield you an article you're looking for:

enter image description here

Click a result that has a .playground icon to its left. From here, you can use the "Action" button on the right side of the window to open the file directly in an Xcode Playground.

enter image description here

like image 104
Mick MacCallum Avatar answered Oct 03 '22 20:10

Mick MacCallum