Work with pages in Swift Playgrounds on iPad
You can add pages to your playground to add features and help organize your code. You can also rename, reorder, duplicate, or delete pages.
Note: There are some differences between iPadOS 14.0 or later and iPadOS 13.6.1 or earlier in the way you work with pages. The instructions note the differences.
In iPadOS 14.0 or later, the pages appear in the playground’s sidebar, which opens when you tap in the playground.
Go to a page
In the open playground in the Swift Playgrounds app on your iPad, do any of the following:
View a list of the playground’s pages: Tap near the top left to open the sidebar in iPadOS 14.0 or later.
Go to a page: Tap the page in the sidebar.
Note: To go to a page in a playground in iPadOS 13.6.1 or earlier, tap the page title at the top of the screen, then tap a page in the list.
Add or delete a page
In a playground you create in the Swift Playgrounds app in iPadOS 14.0 or later, tap to open the sidebar, tap Edit above the page list, then do any of the following in the sidebar:
Add a new page: In iPadOS 14.0 or later, tap the Add button next to Pages, then type a name for the new page.
Note: To add a page in a playground in iPadOS 13.6.1 or earlier, tap the page title at the top of the screen, then tap Add Page.
Delete a page: In iPadOS 14.0 or later, tap next to the page, then choose Delete.
If Delete doesn’t appear in the list of options for a page, it means you can’t delete that page.
Note: To delete a page in a playground in iPadOS 13.6.1 or earlier, tap the page title at the top of the screen, tap Edit, tap the checkbox next to the page, then tap Delete.
Rename or duplicate a page
In a playground you create on your iPad, you can rename or duplicate a page.
Open the sidebar in the Swift Playgrounds app in iPadOS 14.0 or later by tapping .
Tap Edit above the page list, then do any of the following:
Rename a page: Tap next to the page, choose Rename, then enter a new name.
Duplicate a page: Tap next to the page, choose Duplicate, then enter a name for the duplicate.
Note: To rename a page in iPadOS 13.6.1 or earlier, tap the page title at the top of the screen, tap Edit, double-tap the page name, then enter a new name. To duplicate a page, tap the page title at the top of the screen, tap Edit, tap the checkbox next to the page, then tap Duplicate.
Reorder pages
In a playground you create on your iPad, you can reorder the pages.
In the Swift Playgrounds app in iPadOS 14.0 or later, open the sidebar by tapping .
Tap Edit, touch and hold next to any page, then drag it to change the order of the pages.
When you finish making changes to the pages, tap Done in the upper-right corner of the list.
Note: To reorder pages in a playground in iPadOS 13.6.1 or earlier, tap the page title at the top of the screen, tap Edit, touch and hold next to any page, then drag it.