Xcode:有什么方法可以刷新/重新运行游乐场吗? [英] Xcode: Any way to refresh/re-run the playground?
问题描述
您键入时,Xcode中的Playground会自动更新,但是我不知道如何让Playground进行重新编译".
The Playground in Xcode automatically updates as you type, but I can't figure out how to get the Playground to "re-compile".
在许多情况下这无关紧要,但是,如果您编写的代码会生成或使用随机值,则多次运行它以确保其正常工作会很有用.有什么方法可以让游乐场重置/刷新/重新运行?
In many cases this wouldn't matter, but if you're writing code that generates or uses random values it can be useful to run it a few times to make sure it's working. Is there any way to get the playground to reset / refresh / re-run?
看到了几个问题,询问如何阻止Playground自动更新,但反之则无济于事.
Seen a few questions asking how to stop the Playground from auto-updating, but nothing for the opposite.
最简单的方法似乎是编辑代码(添加和删除空格)或放入某种循环……只是想知道是否有菜单快捷方式等.
Easiest way to do this seems to be to just edit the code (add and remove a space), or put in some kind of a loop... Just wondering if there's a menu shortcut etc.
推荐答案
从Xcode菜单尝试Editor
> Execute Playground
Try Editor
> Execute Playground
from Xcode menu
顺便说一下,我不知道Reset Playground
是什么.
I don't know what Reset Playground
is, by the way.
这篇关于Xcode:有什么方法可以刷新/重新运行游乐场吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!