
Use and create playground books in Swift Playground on iPad
In addition to working with app playgrounds, you can use and create playground books in Swift Playground. 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 Playground 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 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, tap New Playground on the welcome screen, then tap 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.