问题描述
我正在一个Xcode 7 Playground上工作,它可以同时运行许多东西.每当我进行编辑时,它都会刷新,重新启动正在运行的内容,并再次遍历整个代码.那大约每15分钟就会使我的操场崩溃.有没有一种方法可以防止游乐场在我进行编辑时自动运行?
I'm working on an Xcode 7 Playground that has many things running at once. Whenever I make an edit, it refreshes, restarts what was running and runs through the entire code again. That crashes my playground around every 15 minutes. Is there a way to prevent playgrounds from automatically running whenever I make an edit?
推荐答案
在操场的左下角,有一个向右的蓝色箭头,看起来像一个播放"按钮.
In the lower-left part of the Playground there's a right-facing blue arrow, looking like a "play" button.
长按此按钮,您将获得两个选项:自动运行"和手动运行".
Do a long click on this button and you will get two options: "Automatically Run" and "Manually Run".
选择后者将Playground设置为手动模式,然后单击此按钮自行启动/停止执行.
Choose the latter to put the Playground is manual mode and start/stop its execution yourself by clicking on this button.
您还可以通过对执行游乐场"编辑器菜单命令使用自定义快捷方式来触发代码执行.
You can also trigger the code execution by making a custom shortcut to the "Execute Playground" Editor menu command.
转到Xcode > Preferences...
,然后转到Key Bindings
,向下滚动到Editor Menu for Playground
,并双击Execute Playground
命令前面的右栏中,添加您选择的新快捷方式.
Go to Xcode > Preferences...
then go to Key Bindings
, scroll down to Editor Menu for Playground
and add a new shortcut of your choice by double-clicking in the right column in front of the Execute Playground
command.
这篇关于如何防止Xcode 7 Playgrounds自动运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!