Can I put multiple playground files into one Xcode workbook?

2.9k Views Asked by At

I am using Xcode Playgrounds to make tutorials about Swift. I was wondering, can I put multiple playground files into one Xcode workbook? I want one workbook with multiple playground tutorials in it.

2

There are 2 best solutions below

1
Papershine On BEST ANSWER

You can right click on your top level file and select the "New Playground Page" button, which will give you a separate page.

new page

The below image shows the new page created after you click that button. "Untitled Page" is the initial page, and "Untitled Page 2" is the new page.

new page

0
Suryavel TR On

You can create either Empty Project or Workspace to manage your multiple playground files under one roof.

1. Empty Project:

  • File -> New -> Project
  • Choose Other and Select Empty

enter image description here

  • Create/Add Your Playground files to the workspace by right clicking on the Project Navigator

enter image description here

2. Workspace:

  • File -> New -> Workspace

New Workspace Option

  • Create/Add Your Playground files to the workspace by right clicking on the Project Navigator

enter image description here