Learn Swift syntax with playgrounds. Playgrounds are a new way to test out code in Xcode 6. We use these in our Apple Watch Meetup group. If you're inspired, check out happywatch.
- Declaring variables and constants
- Arrays, dictionaries, and optionals
- Loops
- Parameters and return values
- Tuples
- Simple algorithms using "if let" optionals
- UIKit Views & Labels
- Images
- Class
- Tables and DataSource
- Optional parameters
- Generics and inout
- Passing functions for Functional Programming
- Higher-order functions — Sorted, Map, Filter, Reduce
Apple demonstrated this playground when introducing Swift at WWDC. It features SpriteKit 2D animation special effects and includes documentation and suggestions for experimentation.
A way to describe and match a set of values based on certain rules. It features enums and switch statements. It also includes documentation and suggestions for experimentation.
This playground features generated 3D shape toruses that spin around with animation.