iosswiftrefreshxcode6swift-playground

Xcode: Any way to refresh/re-run the 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?

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.


Solution

  • Try Editor > Execute Playground from Xcode menu

    enter image description here

    I don't know what Reset Playground is, by the way.