简体   繁体   English

我如何“在Xcode中打开这个章节作为游乐场”?

[英]How do I “open this chapter as a playground in Xcode”?

我在iBooks中打开了Swift书,看到了“为获得最佳体验,请将此章打开为Xcode中的游乐场。”这是怎么做到的?

  • Launch Xcode 6 启动Xcode 6
  • Documentation and API Reference Window (command-shift-0) 文档和API参考窗口(command-shift-0)
  • Search for “The Swift Programming Language” 搜索“Swift编程语言”
  • 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”. 您将在屏幕左侧看到一系列可折叠菜单,详细说明不同部分,例如“A Swift Tour”和“语言指南”。 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. 当您单击其中一个“打开游乐场”链接时,与此部分关联的.playground文件将下载到您的下载文件夹,并可以使用Xcode 6直接打开。

在此输入图像描述

There is even another option that allows you to open the playground files directly without first dropping them in your downloads folder. 还有一个选项允许您直接打开playground文件,而无需先将它们放入下载文件夹中。

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: 在Xcode 6的文档查看器中,搜索“A Swift Tour”或您找到的任何其他术语,以便为您提供您正在寻找的文章:

在此输入图像描述

Click a result that has a .playground icon to its left. 单击左侧有.playground图标的结果。 From here, you can use the "Action" button on the right side of the window to open the file directly in an Xcode Playground. 从这里,您可以使用窗口右侧的“操作”按钮直接在Xcode Playground中打开文件。

在此输入图像描述

It's simple, open the book on your Mac or iPad, you will see a "Download playground" link just bellow that statement "open this chapter as a playground in Xcode". 这很简单,在你的Mac或iPad上打开这本书,你会看到一个“下载游乐场”链接,只是声明“打开这章作为Xcode的游乐场”。 You have to download that playground and open it, that's all. 你必须下载那个操场并打开它,就是这样。

I was tricked because I thought I don't need to download the playground since I already had Xcode installed, apparently I should do it. 我被骗了,因为我觉得我不需要下载游乐场,因为我已经安装了Xcode,显然我应该这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM