A curated list of awesome Swift playgrounds.
Please take a quick look at the contribution guidelines first. Thanks to all contributors; you rock!
If you see a playground here that does not work anymore with the current release of Xcode or is not a good fit, please submit a pull request to improve this file or consider updating it. Thank you!
π = My personal favorites
π± = iOS Playground
βοΈ = Swift 3+ Playground
- Learning Swift
- Learning Swift: Advanced Topics
- Apple's Playgrounds
- Playgrounds about Playgrounds
- Algorithms and Data Structures
- UIKit And Graphics
- Audio
- Mathematics
- Libraries
- Playground sets
- Miscellaneous
Some interesting playgrounds to learn Swift
- Learn Swift - 30+ playgrounds that follow the "Language Guide" section of Apple's Swift book. π
- The Swift Programming Language Playgrounds - 40+ playgrounds, one for each chapter of Apple's Swift book. π βοΈ
- Swift Reference Playground - Reference playground with basic language syntax and examples.
- Swift Worksheets - Learn Swift by reading through and experimenting with playgrounds.
- Swift Crash Course - A Swift crash course, with links explaining the language and a playground for each topic.
- Swift-Introduction - Collection of playgrounds covering various aspect of the Swift language.
- Swift2 by Playgrounds - Learn Swift 2.0 from playgrounds.
- Swift Hack Pack - Collection of playgrounds that teaches Swift.
- SwiftStandardLibraryPlaygrounds - A collection of playground demonstrating the use of the Swift Standard Library.
- MPCS51030 UChicago iOS Course - Playgrounds from the 2015 iOS course of the University of Chicago.
- The Swift Summary Book - A summary of Apple's Swift language. π βοΈ
- Swifter Tips - Examples for every feature of the Swift language.
- About Swift - A playground about Swift language. βοΈ
Advanced topics, useful once you have mastered the basics of the language
- A Swift Introduction to Core Data - Learn Core Data experimenting directly in this playground. π βοΈ
- Swiftly Typed Resources - A playground showing how Swift makes Strings, Colors, Fonts, Images, etc easier to deal with.
- TDDSwiftPlayground - Demonstration of using Swift Playgrounds in Test Driven Development with XCTest.
- Swift DSL Example - Implementation of a DSL in Swift.
- Swift KVO Closures - Swift KVO playground.
- Swift Date Tutorial - Learn everythig about NSDate.
- Swift And C - Examples about using C with Swift.
- Swift Memory Management - How to avoid retain cycles, from this post.
- Concurrency on iOS - Concurrency and Parallelism in iOS.
- Design Patterns Playgrounds - Playground that show various traditional design patterns.
- Design Patterns Playground - Learning GoF's Design Patterns in Swift 2.
- Swift Diagram Playgrounds - Adaptation of the Protocol-Oriented Programming in Swift talk from WWDC 2015.
- Swift Protocol Extensions - A playground to explore Protocol Extensions.
- Battleship Example - An example of how to use Protocol Oriented Programming with the battleship game.
- ReactiveCocoa Playground - The easiest way to get a taste of ReactiveCocoa.
- Swift Reactive Playground - Companion to the article: ReactiveCocoa made Simple With Swift.
Playgrounds from Apple, usually presented at some WWDC
- Apple's Mandelbrot Playground - A playground with the mandelbrot fractal (updated to Swift2 by @palmerc).
- Apple's Balloons Playground - The balloons playground showed at WWDC14.
- Interactive Playgrounds - Playground that presents the interactive playgrounds feature with a UIKit dynamics Newton's cradle. π
- Apple's Crustacean Playground - Protocol-Oriented Programming with Value Types.
- Apple's Swift Standard Library Playground - experiment with Swift standard library types and high-level concepts using visualizations and practical examples.
Playgrounds that describe what you can do with playgrounds
- Interactive Playground - Exploring interactivity in Playgrounds in Xcode 7.3.
- XCTest Playground - Better looking tests for playgrounds. βοΈ
- Mondrian - Make iOS app mockups in Swift 2.x playgrounds.
Algorithms and data structures implemented in Swift
- Learn about transducers - A little tutorial that explains transducers.
- Swift Functors, Applicatives, and Monads in Pictures - Companion to the article: Swift Functors, Applicatves, and Monads in Pictures.
- Functors in Swift - A playground to introduce Functors in Swift, and their practical usage.
- DataStructures Playground - Data Structures and Algorithms in Swift.
- Swiftography - Standard cryptographic algorithms in a Swift Playground.
- Algorithms Playground - Various algorithm implementation in Swift.
- Dynamic Programming With Swift - A set of three dynamic programming problems implemented in a Swift.
- Swift Algorithm Club - Algorithms and data structures in Swift with explanations. π βοΈ
- Sorting Experiments - Alluring experiments with sorting algorithms in Swift, sort of. βοΈ
- The Jelly Bean Problem - The Jelly Bean problem from Wait But Why.
- Euclidean Strings - A playground leveraging ReSwift to generate Euclidean Strings.
- Visual Binary Trees - Effortless visualization of arbitrary Binary Trees, along with their pluggable traversal implementations. π βοΈ
- Logician - Logic programming in Swift. π βοΈ
Programming language interpreters implemented in Swift
- Write your own language: Mu - A playground explaining how to create a tiny programming language named Mu. π βοΈ
- Turtle Playground - A playground with Logo-like commands. π
- Swift Brainfuck - Brainfuck interpreter written in Swift using Playground.
A list of playgrounds that demostrate various aspect of UIKit and other graphical frameworks
- UIStackView Playground - Interesting examples of use of UIStackViews.π βοΈ
- Bezier Path Playgrounds - Some playgrounds to better understand UIBezierPaths. βοΈ
- RPClarity - Shows a technique for blurring an image behind the characters behind one or more UILabels.
- Swift Clock - An animated clock in a swift playground.
- Checkmark Button - Animated check mark button. βοΈ
- UIKit playground - Playgrounds to experiment interactively with UIKit views.
- WatchKit Asset Playground - A swift playground for creating awesome animations for your WatchKit Apps.
- Swift 2.0 Protocol Extension Example - Showing how to use Swift2 protocol extensions to render errors in UIViews and UIViewControllers without subclassing or creating classes.
- Tinting - A small playground to demonstrate image tinting in UIKit.
- Animated GIF Playground - Swift playground for generating animated GIFs.
- Ray tracing Playground - A playground and a series of articles on ray tracing, see also part 2, 3, 4, 5 π
- WWDC16 Logo Playground - Drawing the WWDC16 logo in a playground.
- WWDC16 Typography π―π΅ - Draw a logo or any text with the WWDC16 ASCII texture.
- Window Manager Playground - Playground for an experimental window manager. π±βοΈ
- UIDynamic Playground - Multiple Playgrounds using almost every behaviour of UIDynamic. βοΈ
###Core Image
- Interpolation Playground - Playground demonstrating lerp, smooth step, Catcall-Rom and others!
- CoreImage for Swift Playgrounds - Growing collection of CoreImage playgrounds from the upcoming book "CoreImage For Swift". π
- Image Processor - Implementing different image filter algorithms.
###Metal
- METAL Playground - Apple Metal framework playground. π
- Metalbrot - Interactive playground that draws the Mandelbrot fractal with Metal. π βοΈ
- iOS Animation Samples - Experiment with iOS animations. π
- Additive Animations - Experiment with multiple additive animations in Core Animation.
- Core Animation Playground - Companion to Apple's Core Animation Programming Guide.
- Duet-Inspired Trail Effect - How to get a Duet style trailing effect in SpriteKit.
- Core Animation Swift Playgrounds - A set of interesting Core Animation playgounds.
- SpriteKit Collisions - Demonstrates how to perform physics collision detection using Swift and SpriteKit.
- SceneKit Examples - Experiment with SceneKit and Swift.
- SpriteKit Swift 3 - Playground for exploring Sprite Kit. βοΈ
Sounds and music
- AudioKit Playground Book - A set of playgrounds using AudioKit designed for the iOS10 Playgrounds app. π±
- Bach Playground - A Simple Swift Playground that plays a brief piece by Bach with AVAudioEngine and AVMIDIPlayer.
- PlayerNode Playground - Playground using AVAudioEngine with a playernode and effects to play an audio file. π
Live math with playgrounds
- Lindenmayer Systems - A Swift playground exploring Lindemayer systems.
- Swift Accelerate - Using the Accelerate framework and Swift for Linear Algebra.
- Swifty Mathematics - A collection of swift playground about mathematics.
- Numerical Algorithms - Numerical argorithms playground from Ray Wenderlich.
- Swift Natural Numbers - A playground for implementing the natural numbers and more concepts in number theory.
Library tutorials, in a playground
- Argo Playground - JSON decoding with Argo.
- S3Uploader - A playground to upload images to AWS S3.
- AudioKit Playgrounds - 130+ Audio synthesis, processing, playback, and analysis playgrounds with AudioKit. βοΈ
- AIToolbox - A set of playgrounds showing machine learning algorithms, all implemented with pieces of the AIToolbox framework code. βοΈ
- Realm Swift Playground - A playground that demos the basic features of Realm in swift.
- Cognitive Service APIs - Get started with the Microsoft Cognitive Services APIs. βοΈ
Sets of playgrounds about various topics
- Public Extensions - A set of useful extensions from @PublicExtension. π βοΈ
- Sketchytech's Playgrounds - Various Playgrounds. π
- Parks And Recreation - Great collection of interesting playgrounds, for fun and for profit. π βοΈ
- Swift fun playgrounds - A few playgrounds to showcase Swift peculiar features.
- BradLarson's Playgrounds - Various playgrounds.
- Dmikusa's Playgrounds - Playgrounds that show basic Swift, JSON parsing, sending HTTP requests and basic file IO.
- Cananito's Playgrounds - Various playgrounds.
- Mgrebenets's Playgrounds - Various playgrounds.
- Uberbruns's Playgrounds - Various playgrounds.
- URaimo's Playgrounds - My playgrounds, various topics. βοΈ
- ManuelCarlos's Playgrouds - Various playgrounds. βοΈ
What doesn't fit anywhere else, but still awesome
- Turtle Playground - A playground with Logo-like commands. π
- Game Boards - Chess, checkers, tic-tac-toe, sudoku and many others in playground. π
- Icon Creator - Create app icons on Swift playground. βοΈ
- StarWars Seals - Emblems from Star Wars in Swift playgrounds via CoreGraphics and UIViews
- SwiftFiles - Save, Load and Delete files easily from within a Swift playground.
- Register VM - A register-based VM in a Swift playground. π
- Earth photos - A slideshow of Earth photos taken by DSCOVR/EPIC. π
- 2048 Playground - The 2048 game implemented with a playground. βοΈ
- File Browser Playground - Simple File Browser for Swift Playgrounds on iOS.π±
- SwiftShell - Bash shell in a playground. βοΈ