Work with pages in Swift Playgrounds on Mac
You can add pages to your playground to add features and help organize your code. You can also rename, duplicate, reorder, and delete pages.
The pages appear in the playground’s sidebar, which opens when you click near the top left in the playground.
Go to a page
In the open playground in the Swift Playgrounds app on your Mac, do any of the following:
View a list of the playground’s pages: Click near the top left to open the sidebar.
Go to a page: Click the page in the sidebar.
Add or delete a page
In the open playground in the Swift Playgrounds app on your Mac, do any of the following in the sidebar:
Add a new page: Move your cursor to Pages (just above the first page in the list), then click .
Delete a page: Control-click the page name, then choose Delete.
Rename or duplicate a page
In the open playground in the Swift Playgrounds app on your Mac, do any of the following:
Rename a page: Control-click the page name in the sidebar, choose Rename, type a new name, then press Return.
Duplicate a page: Control-click the page name, then choose Duplicate. The new page appears with its name selected. Type to rename it, then press Return.
Reorder pages
You can reorder the pages in your playground.
In the open playground in the Swift Playgrounds app on your Mac, open the sidebar by clicking at the top left.
Drag any page to change the order of the pages.
When you finish making changes to the page order, click at the top left to close the sidebar.