Skip to content

Learn Swift syntax with playgrounds. Playgrounds are a new way to test out code in Xcode 6. We use this in our Apple Watch Meetup group.

Notifications You must be signed in to change notification settings

happywatch/swift-fun

Repository files navigation

swift-fun

Playground Collection

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.

Tutorial Playgrounds

Basic Syntax

  • Declaring variables and constants
  • Arrays, dictionaries, and optionals
  • Loops

Functions

  • Parameters and return values
  • Tuples
  • Simple algorithms using "if let" optionals

Design Objects

  • UIKit Views & Labels
  • Images
  • Class
  • Tables and DataSource

Advanced Functions

  • Optional parameters
  • Generics and inout
  • Passing functions for Functional Programming
  • Higher-order functions — Sorted, Map, Filter, Reduce

Sample Code

Baloons

Apple demonstrated this playground when introducing Swift at WWDC. It features SpriteKit 2D animation special effects and includes documentation and suggestions for experimentation.

Patterns

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.

SceneKit

This playground features generated 3D shape toruses that spin around with animation.

About

Learn Swift syntax with playgrounds. Playgrounds are a new way to test out code in Xcode 6. We use this in our Apple Watch Meetup group.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published