© Jesse Feiler 2017

Jesse Feiler, Exploring Swift Playgrounds, 10.1007/978-1-4842-2647-6_7

7. Adding Resources and Source Code to Playgrounds

Jesse Feiler

(1)Plattsburgh, New York, USA

When you create a playground—either on a Mac with Xcode or using Playgrounds on an iPad—you can start writing your code right away. You can use import to bring in modules large and small, including ones that are focused on specific tasks such as managing audio or video or even playgrounds themselves (with PlaygroundSupport). You can control what parts of your code are visible in a playground by using markup commands such as //#-editable-code and //#-end-editable-code (see Chapters 4 and 6 for examples).

Playgrounds are actually packages of files that can include resources ...

Get Exploring Swift Playgrounds: The Fastest and Most Effective Way to Learn to Code and to Teach Others to Use Your Code now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.