Nollställa en playground i Swift Playgrounds på datorn
I en del playgrounder i Swift Playgrounds kan du nollställa dina ändringar hela vägen tillbaka till startpunkten. Det här är särskilt användbart om du vill göra ett nytt försök med en utmaning som du redan har klarat av eller låta en vän göra ett försök. Du kan nollställa den aktuella sidan eller alla sidor i en playground.
Obs! I en playground som har skapats från Playground-knappen på skärmen Mina playgrounder kan du inte nollställa ändringar. Du kan skapa en annan tom playground genom att öppna skärmen Mina playgrounder och klicka igen på knappen Playground. Se Skapa en playground.
Nollställa en sida i en playground
Obs! När du nollställer en sida raderas alla kodändringar som du har gjort på en sida så att sidan återgår till sin ursprungliga version. Om du nollställer en sida i en playground som stöder användarmoduler nollställs koden i den huvudsakliga Swift-filen på den aktuella sidan (i fliken med överst), men de delade Swift-filerna i playgrounden nollställs inte.
Gå till sidan som du vill nollställa i appen Swift Playgrounds på datorn och välj sedan Arkiv > Starta om sidan.
Nollställa en playground
Obs! När du nollställer en playground raderas all kod, alla bilder och alla resurser som du har lagt till så att playgrounden återgår till sin ursprungliga version. Om du nollställer en playground i en playground som stöder användarmoduler raderas moduler och filer som du har lagt till i playgrounden och kodändringar som du har gjort i Swift-filer som ingår i playgrounden.
Öppna skärmen Mina playgrounder i appen Swift Playgrounds på datorn.
Kontroll-klicka på playgrounden som du vill nollställa och välj sedan Nollställ playground.