Use and create playground books in Swift Playgrounds on iPad
In addition to working with app playgrounds, you can use and create playground books in Swift Playgrounds. To explore sample playground books, go to the More Playgrounds screen—the playground books are in the Books section at the bottom.
Use a playground book
In the Swift Playgrounds app on your iPad, tap a playground in the Books section at the bottom of the More Playgrounds screen to view a description.
To go to the More Playgrounds screen, tap See All near the bottom right of the My Playgrounds screen.
If you’re working in a playground book, tap at the top left, then tap See All.
If you’re working in an app playground, tap at the top left, then tap See All.
Tap to return to the More Playgrounds screen, then tap Get to download the playground book.
After it’s downloaded, tap the playground book to open it.
If there’s code in the playground book, you can tap Run My Code to see what it does.
The playground books have sample code you can run. To step through the code and see it become highlighted as it runs, tap , then choose Step Through My Code.
Create a new playground book
To create a new playground book, go to the My Playgrounds screen and tap the Playground button near the bottom left. This creates a blank playground (named My Playground), which appears on the My Playgrounds screen. You can tap to open it.
When you’re ready to add your own code, see Enter code in a playground book. You can apply what you learned in the Learn to Code playgrounds and other playgrounds where you tried running code.