Xcode 9 Beta - 无法添加新的Playground页面

问题描述 投票:3回答:2

在Xcode 9 Beta中,我创建了一个新的Playground(File - > New - > Playground)。现在,当我添加一个新的Playground页面(文件 - >新建 - >游乐场页面)时,它不会被添加/显示。这是一个错误吗?

xcode swift-playground xcode9-beta xcode9
2个回答
13
投票

我在测试版和Xcode 9.0的最终版本中遇到了同样的问题。作为发布说明中的状态如下。现在我使用两个步骤来解决问题。

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/xcode_9/xcode_9.html

在Xcode菜单中,选择File - > New - > Playground,Xcode将打开窗口供您选择模板。

enter image description here

选择其中一个模板并导航到项目文件夹进行保存(首先它会将您带到一个远离现有项目文件夹的位置,这应该是固定的!)。一旦点击保存,操场文件将打开(我在新窗口中打开),关闭该窗口。接下来在ProjectNavigator中,右键单击项目或项目下的组(无论您希望在哪里首先添加操场)。选择“将文件添加到YourProjectName”。选择刚刚创建的游乐场文件,然后单击“确定”。你的游乐场现在应该包括在内。

enter image description here


1
投票

在XCode 9中,我可以通过右键单击操场并选择“New Playground Page”在现有游乐场下创建New Page,如下面的屏幕截图所示。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.