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.
If you’re on the My Playgrounds screen, tap See All near the bottom right.
If you’re working in a playground book or an app playground, tap at the top left, then tap See All.
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, tap near the top right, then tap New Book. This creates and opens a blank playground book (named My Playground).
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.